diff --git a/packages/google-cloud-iap/protos/google/cloud/iap/v1/service.proto b/packages/google-cloud-iap/protos/google/cloud/iap/v1/service.proto index b0ba2e3fbf1..7d3421a2a71 100644 --- a/packages/google-cloud-iap/protos/google/cloud/iap/v1/service.proto +++ b/packages/google-cloud-iap/protos/google/cloud/iap/v1/service.proto @@ -148,6 +148,93 @@ service IdentityAwareProxyAdminService { } } +// API to programmatically create, list and retrieve Identity Aware Proxy (IAP) +// OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth +// clients. +service IdentityAwareProxyOAuthService { + option (google.api.default_host) = "iap.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists the existing brands for the project. + rpc ListBrands(ListBrandsRequest) returns (ListBrandsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/brands" + }; + } + + // Constructs a new OAuth brand for the project if one does not exist. + // The created brand is "internal only", meaning that OAuth clients created + // under it only accept requests from users who belong to the same Google + // Workspace organization as the project. The brand is created in an + // un-reviewed status. NOTE: The "internal only" status can be manually + // changed in the Google Cloud Console. Requires that a brand does not already + // exist for the project, and that the specified support email is owned by the + // caller. + rpc CreateBrand(CreateBrandRequest) returns (Brand) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/brands" + body: "brand" + }; + } + + // Retrieves the OAuth brand of the project. + rpc GetBrand(GetBrandRequest) returns (Brand) { + option (google.api.http) = { + get: "/v1/{name=projects/*/brands/*}" + }; + } + + // Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned + // by IAP. Requires that the brand for the project exists and that it is + // set for internal-only use. + rpc CreateIdentityAwareProxyClient(CreateIdentityAwareProxyClientRequest) + returns (IdentityAwareProxyClient) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" + body: "identity_aware_proxy_client" + }; + } + + // Lists the existing clients for the brand. + rpc ListIdentityAwareProxyClients(ListIdentityAwareProxyClientsRequest) + returns (ListIdentityAwareProxyClientsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" + }; + } + + // Retrieves an Identity Aware Proxy (IAP) OAuth client. + // Requires that the client is owned by IAP. + rpc GetIdentityAwareProxyClient(GetIdentityAwareProxyClientRequest) + returns (IdentityAwareProxyClient) { + option (google.api.http) = { + get: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + }; + } + + // Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the + // secret was compromised. Requires that the client is owned by IAP. + rpc ResetIdentityAwareProxyClientSecret( + ResetIdentityAwareProxyClientSecretRequest) + returns (IdentityAwareProxyClient) { + option (google.api.http) = { + post: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret" + body: "*" + }; + } + + // Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing + // obsolete clients, managing the number of clients in a given project, and + // cleaning up after tests. Requires that the client is owned by IAP. + rpc DeleteIdentityAwareProxyClient(DeleteIdentityAwareProxyClientRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + }; + } +} + // The request to ListTunnelDestGroups. message ListTunnelDestGroupsRequest { // Required. Google Cloud Project ID and location. @@ -286,8 +373,11 @@ message UpdateIapSettingsRequest { IapSettings iap_settings = 1 [(google.api.field_behavior) = REQUIRED]; // The field mask specifying which IAP settings should be updated. - // If omitted, the all of the settings are updated. See - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If omitted, then all of the settings are updated. See + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + // + // Note: All IAP reauth settings must always be set together, using the + // field mask: `iapSettings.accessSettings.reauthSettings`. google.protobuf.FieldMask update_mask = 2; } @@ -371,6 +461,9 @@ message ReauthSettings { // User must use their secure key 2nd factor device. SECURE_KEY = 3; + + // User can use any enabled 2nd factor. + ENROLLED_SECOND_FACTORS = 4; } // Type of policy in the case of hierarchial policies. @@ -508,93 +601,6 @@ message AttributePropagationSettings { optional bool enable = 3; } -// API to programmatically create, list and retrieve Identity Aware Proxy (IAP) -// OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth -// clients. -service IdentityAwareProxyOAuthService { - option (google.api.default_host) = "iap.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists the existing brands for the project. - rpc ListBrands(ListBrandsRequest) returns (ListBrandsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/brands" - }; - } - - // Constructs a new OAuth brand for the project if one does not exist. - // The created brand is "internal only", meaning that OAuth clients created - // under it only accept requests from users who belong to the same Google - // Workspace organization as the project. The brand is created in an - // un-reviewed status. NOTE: The "internal only" status can be manually - // changed in the Google Cloud Console. Requires that a brand does not already - // exist for the project, and that the specified support email is owned by the - // caller. - rpc CreateBrand(CreateBrandRequest) returns (Brand) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/brands" - body: "brand" - }; - } - - // Retrieves the OAuth brand of the project. - rpc GetBrand(GetBrandRequest) returns (Brand) { - option (google.api.http) = { - get: "/v1/{name=projects/*/brands/*}" - }; - } - - // Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned - // by IAP. Requires that the brand for the project exists and that it is - // set for internal-only use. - rpc CreateIdentityAwareProxyClient(CreateIdentityAwareProxyClientRequest) - returns (IdentityAwareProxyClient) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" - body: "identity_aware_proxy_client" - }; - } - - // Lists the existing clients for the brand. - rpc ListIdentityAwareProxyClients(ListIdentityAwareProxyClientsRequest) - returns (ListIdentityAwareProxyClientsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" - }; - } - - // Retrieves an Identity Aware Proxy (IAP) OAuth client. - // Requires that the client is owned by IAP. - rpc GetIdentityAwareProxyClient(GetIdentityAwareProxyClientRequest) - returns (IdentityAwareProxyClient) { - option (google.api.http) = { - get: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - }; - } - - // Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the - // secret was compromised. Requires that the client is owned by IAP. - rpc ResetIdentityAwareProxyClientSecret( - ResetIdentityAwareProxyClientSecretRequest) - returns (IdentityAwareProxyClient) { - option (google.api.http) = { - post: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret" - body: "*" - }; - } - - // Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing - // obsolete clients, managing the number of clients in a given project, and - // cleaning up after tests. Requires that the client is owned by IAP. - rpc DeleteIdentityAwareProxyClient(DeleteIdentityAwareProxyClientRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - }; - } -} - // The request sent to ListBrands. message ListBrandsRequest { // Required. GCP Project number/id. diff --git a/packages/google-cloud-iap/protos/protos.d.ts b/packages/google-cloud-iap/protos/protos.d.ts index 6cfd81ddec4..d91f9103297 100644 --- a/packages/google-cloud-iap/protos/protos.d.ts +++ b/packages/google-cloud-iap/protos/protos.d.ts @@ -260,6 +260,198 @@ export namespace google { type UpdateTunnelDestGroupCallback = (error: (Error|null), response?: google.cloud.iap.v1.TunnelDestGroup) => void; } + /** Represents an IdentityAwareProxyOAuthService */ + class IdentityAwareProxyOAuthService extends $protobuf.rpc.Service { + + /** + * Constructs a new IdentityAwareProxyOAuthService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new IdentityAwareProxyOAuthService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IdentityAwareProxyOAuthService; + + /** + * Calls ListBrands. + * @param request ListBrandsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBrandsResponse + */ + public listBrands(request: google.cloud.iap.v1.IListBrandsRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrandsCallback): void; + + /** + * Calls ListBrands. + * @param request ListBrandsRequest message or plain object + * @returns Promise + */ + public listBrands(request: google.cloud.iap.v1.IListBrandsRequest): Promise; + + /** + * Calls CreateBrand. + * @param request CreateBrandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Brand + */ + public createBrand(request: google.cloud.iap.v1.ICreateBrandRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrandCallback): void; + + /** + * Calls CreateBrand. + * @param request CreateBrandRequest message or plain object + * @returns Promise + */ + public createBrand(request: google.cloud.iap.v1.ICreateBrandRequest): Promise; + + /** + * Calls GetBrand. + * @param request GetBrandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Brand + */ + public getBrand(request: google.cloud.iap.v1.IGetBrandRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrandCallback): void; + + /** + * Calls GetBrand. + * @param request GetBrandRequest message or plain object + * @returns Promise + */ + public getBrand(request: google.cloud.iap.v1.IGetBrandRequest): Promise; + + /** + * Calls CreateIdentityAwareProxyClient. + * @param request CreateIdentityAwareProxyClientRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + */ + public createIdentityAwareProxyClient(request: google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClientCallback): void; + + /** + * Calls CreateIdentityAwareProxyClient. + * @param request CreateIdentityAwareProxyClientRequest message or plain object + * @returns Promise + */ + public createIdentityAwareProxyClient(request: google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest): Promise; + + /** + * Calls ListIdentityAwareProxyClients. + * @param request ListIdentityAwareProxyClientsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListIdentityAwareProxyClientsResponse + */ + public listIdentityAwareProxyClients(request: google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClientsCallback): void; + + /** + * Calls ListIdentityAwareProxyClients. + * @param request ListIdentityAwareProxyClientsRequest message or plain object + * @returns Promise + */ + public listIdentityAwareProxyClients(request: google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest): Promise; + + /** + * Calls GetIdentityAwareProxyClient. + * @param request GetIdentityAwareProxyClientRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + */ + public getIdentityAwareProxyClient(request: google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClientCallback): void; + + /** + * Calls GetIdentityAwareProxyClient. + * @param request GetIdentityAwareProxyClientRequest message or plain object + * @returns Promise + */ + public getIdentityAwareProxyClient(request: google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest): Promise; + + /** + * Calls ResetIdentityAwareProxyClientSecret. + * @param request ResetIdentityAwareProxyClientSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + */ + public resetIdentityAwareProxyClientSecret(request: google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecretCallback): void; + + /** + * Calls ResetIdentityAwareProxyClientSecret. + * @param request ResetIdentityAwareProxyClientSecretRequest message or plain object + * @returns Promise + */ + public resetIdentityAwareProxyClientSecret(request: google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest): Promise; + + /** + * Calls DeleteIdentityAwareProxyClient. + * @param request DeleteIdentityAwareProxyClientRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteIdentityAwareProxyClient(request: google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClientCallback): void; + + /** + * Calls DeleteIdentityAwareProxyClient. + * @param request DeleteIdentityAwareProxyClientRequest message or plain object + * @returns Promise + */ + public deleteIdentityAwareProxyClient(request: google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest): Promise; + } + + namespace IdentityAwareProxyOAuthService { + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listBrands}. + * @param error Error, if any + * @param [response] ListBrandsResponse + */ + type ListBrandsCallback = (error: (Error|null), response?: google.cloud.iap.v1.ListBrandsResponse) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createBrand}. + * @param error Error, if any + * @param [response] Brand + */ + type CreateBrandCallback = (error: (Error|null), response?: google.cloud.iap.v1.Brand) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getBrand}. + * @param error Error, if any + * @param [response] Brand + */ + type GetBrandCallback = (error: (Error|null), response?: google.cloud.iap.v1.Brand) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createIdentityAwareProxyClient}. + * @param error Error, if any + * @param [response] IdentityAwareProxyClient + */ + type CreateIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listIdentityAwareProxyClients}. + * @param error Error, if any + * @param [response] ListIdentityAwareProxyClientsResponse + */ + type ListIdentityAwareProxyClientsCallback = (error: (Error|null), response?: google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getIdentityAwareProxyClient}. + * @param error Error, if any + * @param [response] IdentityAwareProxyClient + */ + type GetIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|resetIdentityAwareProxyClientSecret}. + * @param error Error, if any + * @param [response] IdentityAwareProxyClient + */ + type ResetIdentityAwareProxyClientSecretCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|deleteIdentityAwareProxyClient}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + /** Properties of a ListTunnelDestGroupsRequest. */ interface IListTunnelDestGroupsRequest { @@ -1830,7 +2022,8 @@ export namespace google { METHOD_UNSPECIFIED = 0, LOGIN = 1, PASSWORD = 2, - SECURE_KEY = 3 + SECURE_KEY = 3, + ENROLLED_SECOND_FACTORS = 4 } /** PolicyType enum. */ @@ -2397,198 +2590,6 @@ export namespace google { } } - /** Represents an IdentityAwareProxyOAuthService */ - class IdentityAwareProxyOAuthService extends $protobuf.rpc.Service { - - /** - * Constructs a new IdentityAwareProxyOAuthService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new IdentityAwareProxyOAuthService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): IdentityAwareProxyOAuthService; - - /** - * Calls ListBrands. - * @param request ListBrandsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBrandsResponse - */ - public listBrands(request: google.cloud.iap.v1.IListBrandsRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrandsCallback): void; - - /** - * Calls ListBrands. - * @param request ListBrandsRequest message or plain object - * @returns Promise - */ - public listBrands(request: google.cloud.iap.v1.IListBrandsRequest): Promise; - - /** - * Calls CreateBrand. - * @param request CreateBrandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Brand - */ - public createBrand(request: google.cloud.iap.v1.ICreateBrandRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrandCallback): void; - - /** - * Calls CreateBrand. - * @param request CreateBrandRequest message or plain object - * @returns Promise - */ - public createBrand(request: google.cloud.iap.v1.ICreateBrandRequest): Promise; - - /** - * Calls GetBrand. - * @param request GetBrandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Brand - */ - public getBrand(request: google.cloud.iap.v1.IGetBrandRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrandCallback): void; - - /** - * Calls GetBrand. - * @param request GetBrandRequest message or plain object - * @returns Promise - */ - public getBrand(request: google.cloud.iap.v1.IGetBrandRequest): Promise; - - /** - * Calls CreateIdentityAwareProxyClient. - * @param request CreateIdentityAwareProxyClientRequest message or plain object - * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - */ - public createIdentityAwareProxyClient(request: google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClientCallback): void; - - /** - * Calls CreateIdentityAwareProxyClient. - * @param request CreateIdentityAwareProxyClientRequest message or plain object - * @returns Promise - */ - public createIdentityAwareProxyClient(request: google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest): Promise; - - /** - * Calls ListIdentityAwareProxyClients. - * @param request ListIdentityAwareProxyClientsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListIdentityAwareProxyClientsResponse - */ - public listIdentityAwareProxyClients(request: google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClientsCallback): void; - - /** - * Calls ListIdentityAwareProxyClients. - * @param request ListIdentityAwareProxyClientsRequest message or plain object - * @returns Promise - */ - public listIdentityAwareProxyClients(request: google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest): Promise; - - /** - * Calls GetIdentityAwareProxyClient. - * @param request GetIdentityAwareProxyClientRequest message or plain object - * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - */ - public getIdentityAwareProxyClient(request: google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClientCallback): void; - - /** - * Calls GetIdentityAwareProxyClient. - * @param request GetIdentityAwareProxyClientRequest message or plain object - * @returns Promise - */ - public getIdentityAwareProxyClient(request: google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest): Promise; - - /** - * Calls ResetIdentityAwareProxyClientSecret. - * @param request ResetIdentityAwareProxyClientSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - */ - public resetIdentityAwareProxyClientSecret(request: google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecretCallback): void; - - /** - * Calls ResetIdentityAwareProxyClientSecret. - * @param request ResetIdentityAwareProxyClientSecretRequest message or plain object - * @returns Promise - */ - public resetIdentityAwareProxyClientSecret(request: google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest): Promise; - - /** - * Calls DeleteIdentityAwareProxyClient. - * @param request DeleteIdentityAwareProxyClientRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteIdentityAwareProxyClient(request: google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest, callback: google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClientCallback): void; - - /** - * Calls DeleteIdentityAwareProxyClient. - * @param request DeleteIdentityAwareProxyClientRequest message or plain object - * @returns Promise - */ - public deleteIdentityAwareProxyClient(request: google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest): Promise; - } - - namespace IdentityAwareProxyOAuthService { - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listBrands}. - * @param error Error, if any - * @param [response] ListBrandsResponse - */ - type ListBrandsCallback = (error: (Error|null), response?: google.cloud.iap.v1.ListBrandsResponse) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createBrand}. - * @param error Error, if any - * @param [response] Brand - */ - type CreateBrandCallback = (error: (Error|null), response?: google.cloud.iap.v1.Brand) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getBrand}. - * @param error Error, if any - * @param [response] Brand - */ - type GetBrandCallback = (error: (Error|null), response?: google.cloud.iap.v1.Brand) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createIdentityAwareProxyClient}. - * @param error Error, if any - * @param [response] IdentityAwareProxyClient - */ - type CreateIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listIdentityAwareProxyClients}. - * @param error Error, if any - * @param [response] ListIdentityAwareProxyClientsResponse - */ - type ListIdentityAwareProxyClientsCallback = (error: (Error|null), response?: google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getIdentityAwareProxyClient}. - * @param error Error, if any - * @param [response] IdentityAwareProxyClient - */ - type GetIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|resetIdentityAwareProxyClientSecret}. - * @param error Error, if any - * @param [response] IdentityAwareProxyClient - */ - type ResetIdentityAwareProxyClientSecretCallback = (error: (Error|null), response?: google.cloud.iap.v1.IdentityAwareProxyClient) => void; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|deleteIdentityAwareProxyClient}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteIdentityAwareProxyClientCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - /** Properties of a ListBrandsRequest. */ interface IListBrandsRequest { diff --git a/packages/google-cloud-iap/protos/protos.js b/packages/google-cloud-iap/protos/protos.js index c6e553bfc13..c17c6002193 100644 --- a/packages/google-cloud-iap/protos/protos.js +++ b/packages/google-cloud-iap/protos/protos.js @@ -431,276 +431,325 @@ return IdentityAwareProxyAdminService; })(); - v1.ListTunnelDestGroupsRequest = (function() { + v1.IdentityAwareProxyOAuthService = (function() { /** - * Properties of a ListTunnelDestGroupsRequest. + * Constructs a new IdentityAwareProxyOAuthService service. * @memberof google.cloud.iap.v1 - * @interface IListTunnelDestGroupsRequest - * @property {string|null} [parent] ListTunnelDestGroupsRequest parent - * @property {number|null} [pageSize] ListTunnelDestGroupsRequest pageSize - * @property {string|null} [pageToken] ListTunnelDestGroupsRequest pageToken + * @classdesc Represents an IdentityAwareProxyOAuthService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function IdentityAwareProxyOAuthService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IdentityAwareProxyOAuthService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IdentityAwareProxyOAuthService; /** - * Constructs a new ListTunnelDestGroupsRequest. - * @memberof google.cloud.iap.v1 - * @classdesc Represents a ListTunnelDestGroupsRequest. - * @implements IListTunnelDestGroupsRequest - * @constructor - * @param {google.cloud.iap.v1.IListTunnelDestGroupsRequest=} [properties] Properties to set + * Creates new IdentityAwareProxyOAuthService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {IdentityAwareProxyOAuthService} RPC service. Useful where requests and/or responses are streamed. */ - function ListTunnelDestGroupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + IdentityAwareProxyOAuthService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListTunnelDestGroupsRequest parent. - * @member {string} parent - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @instance + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listBrands}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef ListBrandsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.ListBrandsResponse} [response] ListBrandsResponse */ - ListTunnelDestGroupsRequest.prototype.parent = ""; /** - * ListTunnelDestGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * Calls ListBrands. + * @function listBrands + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService * @instance + * @param {google.cloud.iap.v1.IListBrandsRequest} request ListBrandsRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrandsCallback} callback Node-style callback called with the error, if any, and ListBrandsResponse + * @returns {undefined} + * @variation 1 */ - ListTunnelDestGroupsRequest.prototype.pageSize = 0; + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.listBrands = function listBrands(request, callback) { + return this.rpcCall(listBrands, $root.google.cloud.iap.v1.ListBrandsRequest, $root.google.cloud.iap.v1.ListBrandsResponse, request, callback); + }, "name", { value: "ListBrands" }); /** - * ListTunnelDestGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * Calls ListBrands. + * @function listBrands + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService * @instance + * @param {google.cloud.iap.v1.IListBrandsRequest} request ListBrandsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListTunnelDestGroupsRequest.prototype.pageToken = ""; /** - * Creates a new ListTunnelDestGroupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {google.cloud.iap.v1.IListTunnelDestGroupsRequest=} [properties] Properties to set - * @returns {google.cloud.iap.v1.ListTunnelDestGroupsRequest} ListTunnelDestGroupsRequest instance + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createBrand}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef CreateBrandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.Brand} [response] Brand */ - ListTunnelDestGroupsRequest.create = function create(properties) { - return new ListTunnelDestGroupsRequest(properties); - }; /** - * Encodes the specified ListTunnelDestGroupsRequest message. Does not implicitly {@link google.cloud.iap.v1.ListTunnelDestGroupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {google.cloud.iap.v1.IListTunnelDestGroupsRequest} message ListTunnelDestGroupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateBrand. + * @function createBrand + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.ICreateBrandRequest} request CreateBrandRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrandCallback} callback Node-style callback called with the error, if any, and Brand + * @returns {undefined} + * @variation 1 */ - ListTunnelDestGroupsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.createBrand = function createBrand(request, callback) { + return this.rpcCall(createBrand, $root.google.cloud.iap.v1.CreateBrandRequest, $root.google.cloud.iap.v1.Brand, request, callback); + }, "name", { value: "CreateBrand" }); /** - * Encodes the specified ListTunnelDestGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.iap.v1.ListTunnelDestGroupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {google.cloud.iap.v1.IListTunnelDestGroupsRequest} message ListTunnelDestGroupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateBrand. + * @function createBrand + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.ICreateBrandRequest} request CreateBrandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListTunnelDestGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListTunnelDestGroupsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.iap.v1.ListTunnelDestGroupsRequest} ListTunnelDestGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getBrand}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef GetBrandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.Brand} [response] Brand */ - ListTunnelDestGroupsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iap.v1.ListTunnelDestGroupsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListTunnelDestGroupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.iap.v1.ListTunnelDestGroupsRequest} ListTunnelDestGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetBrand. + * @function getBrand + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IGetBrandRequest} request GetBrandRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrandCallback} callback Node-style callback called with the error, if any, and Brand + * @returns {undefined} + * @variation 1 */ - ListTunnelDestGroupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.getBrand = function getBrand(request, callback) { + return this.rpcCall(getBrand, $root.google.cloud.iap.v1.GetBrandRequest, $root.google.cloud.iap.v1.Brand, request, callback); + }, "name", { value: "GetBrand" }); /** - * Verifies a ListTunnelDestGroupsRequest message. - * @function verify - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetBrand. + * @function getBrand + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IGetBrandRequest} request GetBrandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListTunnelDestGroupsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; /** - * Creates a ListTunnelDestGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.iap.v1.ListTunnelDestGroupsRequest} ListTunnelDestGroupsRequest + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createIdentityAwareProxyClient}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef CreateIdentityAwareProxyClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient */ - ListTunnelDestGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.iap.v1.ListTunnelDestGroupsRequest) - return object; - var message = new $root.google.cloud.iap.v1.ListTunnelDestGroupsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; /** - * Creates a plain object from a ListTunnelDestGroupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {google.cloud.iap.v1.ListTunnelDestGroupsRequest} message ListTunnelDestGroupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls CreateIdentityAwareProxyClient. + * @function createIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest} request CreateIdentityAwareProxyClientRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + * @returns {undefined} + * @variation 1 */ - ListTunnelDestGroupsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.createIdentityAwareProxyClient = function createIdentityAwareProxyClient(request, callback) { + return this.rpcCall(createIdentityAwareProxyClient, $root.google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); + }, "name", { value: "CreateIdentityAwareProxyClient" }); /** - * Converts this ListTunnelDestGroupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * Calls CreateIdentityAwareProxyClient. + * @function createIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest} request CreateIdentityAwareProxyClientRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListTunnelDestGroupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ListTunnelDestGroupsRequest - * @function getTypeUrl - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listIdentityAwareProxyClients}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef ListIdentityAwareProxyClientsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse} [response] ListIdentityAwareProxyClientsResponse */ - ListTunnelDestGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.iap.v1.ListTunnelDestGroupsRequest"; - }; - return ListTunnelDestGroupsRequest; + /** + * Calls ListIdentityAwareProxyClients. + * @function listIdentityAwareProxyClients + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest} request ListIdentityAwareProxyClientsRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClientsCallback} callback Node-style callback called with the error, if any, and ListIdentityAwareProxyClientsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.listIdentityAwareProxyClients = function listIdentityAwareProxyClients(request, callback) { + return this.rpcCall(listIdentityAwareProxyClients, $root.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest, $root.google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse, request, callback); + }, "name", { value: "ListIdentityAwareProxyClients" }); + + /** + * Calls ListIdentityAwareProxyClients. + * @function listIdentityAwareProxyClients + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest} request ListIdentityAwareProxyClientsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getIdentityAwareProxyClient}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef GetIdentityAwareProxyClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient + */ + + /** + * Calls GetIdentityAwareProxyClient. + * @function getIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest} request GetIdentityAwareProxyClientRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.getIdentityAwareProxyClient = function getIdentityAwareProxyClient(request, callback) { + return this.rpcCall(getIdentityAwareProxyClient, $root.google.cloud.iap.v1.GetIdentityAwareProxyClientRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); + }, "name", { value: "GetIdentityAwareProxyClient" }); + + /** + * Calls GetIdentityAwareProxyClient. + * @function getIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest} request GetIdentityAwareProxyClientRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|resetIdentityAwareProxyClientSecret}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef ResetIdentityAwareProxyClientSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient + */ + + /** + * Calls ResetIdentityAwareProxyClientSecret. + * @function resetIdentityAwareProxyClientSecret + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest} request ResetIdentityAwareProxyClientSecretRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecretCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.resetIdentityAwareProxyClientSecret = function resetIdentityAwareProxyClientSecret(request, callback) { + return this.rpcCall(resetIdentityAwareProxyClientSecret, $root.google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); + }, "name", { value: "ResetIdentityAwareProxyClientSecret" }); + + /** + * Calls ResetIdentityAwareProxyClientSecret. + * @function resetIdentityAwareProxyClientSecret + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest} request ResetIdentityAwareProxyClientSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|deleteIdentityAwareProxyClient}. + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @typedef DeleteIdentityAwareProxyClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteIdentityAwareProxyClient. + * @function deleteIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest} request DeleteIdentityAwareProxyClientRequest message or plain object + * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IdentityAwareProxyOAuthService.prototype.deleteIdentityAwareProxyClient = function deleteIdentityAwareProxyClient(request, callback) { + return this.rpcCall(deleteIdentityAwareProxyClient, $root.google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteIdentityAwareProxyClient" }); + + /** + * Calls DeleteIdentityAwareProxyClient. + * @function deleteIdentityAwareProxyClient + * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService + * @instance + * @param {google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest} request DeleteIdentityAwareProxyClientRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IdentityAwareProxyOAuthService; })(); - v1.ListTunnelDestGroupsResponse = (function() { + v1.ListTunnelDestGroupsRequest = (function() { /** - * Properties of a ListTunnelDestGroupsResponse. + * Properties of a ListTunnelDestGroupsRequest. * @memberof google.cloud.iap.v1 - * @interface IListTunnelDestGroupsResponse - * @property {Array.|null} [tunnelDestGroups] ListTunnelDestGroupsResponse tunnelDestGroups - * @property {string|null} [nextPageToken] ListTunnelDestGroupsResponse nextPageToken + * @interface IListTunnelDestGroupsRequest + * @property {string|null} [parent] ListTunnelDestGroupsRequest parent + * @property {number|null} [pageSize] ListTunnelDestGroupsRequest pageSize + * @property {string|null} [pageToken] ListTunnelDestGroupsRequest pageToken */ /** - * Constructs a new ListTunnelDestGroupsResponse. + * Constructs a new ListTunnelDestGroupsRequest. * @memberof google.cloud.iap.v1 - * @classdesc Represents a ListTunnelDestGroupsResponse. - * @implements IListTunnelDestGroupsResponse + * @classdesc Represents a ListTunnelDestGroupsRequest. + * @implements IListTunnelDestGroupsRequest * @constructor - * @param {google.cloud.iap.v1.IListTunnelDestGroupsResponse=} [properties] Properties to set + * @param {google.cloud.iap.v1.IListTunnelDestGroupsRequest=} [properties] Properties to set */ - function ListTunnelDestGroupsResponse(properties) { - this.tunnelDestGroups = []; + function ListTunnelDestGroupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -708,46 +757,296 @@ } /** - * ListTunnelDestGroupsResponse tunnelDestGroups. - * @member {Array.} tunnelDestGroups - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsResponse + * ListTunnelDestGroupsRequest parent. + * @member {string} parent + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest * @instance */ - ListTunnelDestGroupsResponse.prototype.tunnelDestGroups = $util.emptyArray; + ListTunnelDestGroupsRequest.prototype.parent = ""; /** - * ListTunnelDestGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsResponse + * ListTunnelDestGroupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest * @instance */ - ListTunnelDestGroupsResponse.prototype.nextPageToken = ""; + ListTunnelDestGroupsRequest.prototype.pageSize = 0; /** - * Creates a new ListTunnelDestGroupsResponse instance using the specified properties. + * ListTunnelDestGroupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @instance + */ + ListTunnelDestGroupsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListTunnelDestGroupsRequest instance using the specified properties. * @function create - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsResponse + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest * @static - * @param {google.cloud.iap.v1.IListTunnelDestGroupsResponse=} [properties] Properties to set - * @returns {google.cloud.iap.v1.ListTunnelDestGroupsResponse} ListTunnelDestGroupsResponse instance + * @param {google.cloud.iap.v1.IListTunnelDestGroupsRequest=} [properties] Properties to set + * @returns {google.cloud.iap.v1.ListTunnelDestGroupsRequest} ListTunnelDestGroupsRequest instance */ - ListTunnelDestGroupsResponse.create = function create(properties) { - return new ListTunnelDestGroupsResponse(properties); + ListTunnelDestGroupsRequest.create = function create(properties) { + return new ListTunnelDestGroupsRequest(properties); }; /** - * Encodes the specified ListTunnelDestGroupsResponse message. Does not implicitly {@link google.cloud.iap.v1.ListTunnelDestGroupsResponse.verify|verify} messages. + * Encodes the specified ListTunnelDestGroupsRequest message. Does not implicitly {@link google.cloud.iap.v1.ListTunnelDestGroupsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.iap.v1.ListTunnelDestGroupsResponse + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest * @static - * @param {google.cloud.iap.v1.IListTunnelDestGroupsResponse} message ListTunnelDestGroupsResponse message or plain object to encode + * @param {google.cloud.iap.v1.IListTunnelDestGroupsRequest} message ListTunnelDestGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTunnelDestGroupsResponse.encode = function encode(message, writer) { + ListTunnelDestGroupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tunnelDestGroups != null && message.tunnelDestGroups.length) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListTunnelDestGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.iap.v1.ListTunnelDestGroupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @static + * @param {google.cloud.iap.v1.IListTunnelDestGroupsRequest} message ListTunnelDestGroupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTunnelDestGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTunnelDestGroupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.iap.v1.ListTunnelDestGroupsRequest} ListTunnelDestGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTunnelDestGroupsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.iap.v1.ListTunnelDestGroupsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTunnelDestGroupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.iap.v1.ListTunnelDestGroupsRequest} ListTunnelDestGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTunnelDestGroupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTunnelDestGroupsRequest message. + * @function verify + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTunnelDestGroupsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListTunnelDestGroupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.iap.v1.ListTunnelDestGroupsRequest} ListTunnelDestGroupsRequest + */ + ListTunnelDestGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.iap.v1.ListTunnelDestGroupsRequest) + return object; + var message = new $root.google.cloud.iap.v1.ListTunnelDestGroupsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListTunnelDestGroupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @static + * @param {google.cloud.iap.v1.ListTunnelDestGroupsRequest} message ListTunnelDestGroupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTunnelDestGroupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListTunnelDestGroupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTunnelDestGroupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTunnelDestGroupsRequest + * @function getTypeUrl + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTunnelDestGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.iap.v1.ListTunnelDestGroupsRequest"; + }; + + return ListTunnelDestGroupsRequest; + })(); + + v1.ListTunnelDestGroupsResponse = (function() { + + /** + * Properties of a ListTunnelDestGroupsResponse. + * @memberof google.cloud.iap.v1 + * @interface IListTunnelDestGroupsResponse + * @property {Array.|null} [tunnelDestGroups] ListTunnelDestGroupsResponse tunnelDestGroups + * @property {string|null} [nextPageToken] ListTunnelDestGroupsResponse nextPageToken + */ + + /** + * Constructs a new ListTunnelDestGroupsResponse. + * @memberof google.cloud.iap.v1 + * @classdesc Represents a ListTunnelDestGroupsResponse. + * @implements IListTunnelDestGroupsResponse + * @constructor + * @param {google.cloud.iap.v1.IListTunnelDestGroupsResponse=} [properties] Properties to set + */ + function ListTunnelDestGroupsResponse(properties) { + this.tunnelDestGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTunnelDestGroupsResponse tunnelDestGroups. + * @member {Array.} tunnelDestGroups + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsResponse + * @instance + */ + ListTunnelDestGroupsResponse.prototype.tunnelDestGroups = $util.emptyArray; + + /** + * ListTunnelDestGroupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsResponse + * @instance + */ + ListTunnelDestGroupsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTunnelDestGroupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsResponse + * @static + * @param {google.cloud.iap.v1.IListTunnelDestGroupsResponse=} [properties] Properties to set + * @returns {google.cloud.iap.v1.ListTunnelDestGroupsResponse} ListTunnelDestGroupsResponse instance + */ + ListTunnelDestGroupsResponse.create = function create(properties) { + return new ListTunnelDestGroupsResponse(properties); + }; + + /** + * Encodes the specified ListTunnelDestGroupsResponse message. Does not implicitly {@link google.cloud.iap.v1.ListTunnelDestGroupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.iap.v1.ListTunnelDestGroupsResponse + * @static + * @param {google.cloud.iap.v1.IListTunnelDestGroupsResponse} message ListTunnelDestGroupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTunnelDestGroupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tunnelDestGroups != null && message.tunnelDestGroups.length) for (var i = 0; i < message.tunnelDestGroups.length; ++i) $root.google.cloud.iap.v1.TunnelDestGroup.encode(message.tunnelDestGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) @@ -3964,6 +4263,7 @@ case 1: case 2: case 3: + case 4: break; } if (message.maxAge != null && message.hasOwnProperty("maxAge")) { @@ -4018,6 +4318,10 @@ case 3: message.method = 3; break; + case "ENROLLED_SECOND_FACTORS": + case 4: + message.method = 4; + break; } if (object.maxAge != null) { if (typeof object.maxAge !== "object") @@ -4108,6 +4412,7 @@ * @property {number} LOGIN=1 LOGIN value * @property {number} PASSWORD=2 PASSWORD value * @property {number} SECURE_KEY=3 SECURE_KEY value + * @property {number} ENROLLED_SECOND_FACTORS=4 ENROLLED_SECOND_FACTORS value */ ReauthSettings.Method = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4115,6 +4420,7 @@ values[valuesById[1] = "LOGIN"] = 1; values[valuesById[2] = "PASSWORD"] = 2; values[valuesById[3] = "SECURE_KEY"] = 3; + values[valuesById[4] = "ENROLLED_SECOND_FACTORS"] = 4; return values; })(); @@ -5538,305 +5844,6 @@ return AttributePropagationSettings; })(); - v1.IdentityAwareProxyOAuthService = (function() { - - /** - * Constructs a new IdentityAwareProxyOAuthService service. - * @memberof google.cloud.iap.v1 - * @classdesc Represents an IdentityAwareProxyOAuthService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function IdentityAwareProxyOAuthService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (IdentityAwareProxyOAuthService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IdentityAwareProxyOAuthService; - - /** - * Creates new IdentityAwareProxyOAuthService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {IdentityAwareProxyOAuthService} RPC service. Useful where requests and/or responses are streamed. - */ - IdentityAwareProxyOAuthService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listBrands}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef ListBrandsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.ListBrandsResponse} [response] ListBrandsResponse - */ - - /** - * Calls ListBrands. - * @function listBrands - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IListBrandsRequest} request ListBrandsRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrandsCallback} callback Node-style callback called with the error, if any, and ListBrandsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.listBrands = function listBrands(request, callback) { - return this.rpcCall(listBrands, $root.google.cloud.iap.v1.ListBrandsRequest, $root.google.cloud.iap.v1.ListBrandsResponse, request, callback); - }, "name", { value: "ListBrands" }); - - /** - * Calls ListBrands. - * @function listBrands - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IListBrandsRequest} request ListBrandsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createBrand}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef CreateBrandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.Brand} [response] Brand - */ - - /** - * Calls CreateBrand. - * @function createBrand - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.ICreateBrandRequest} request CreateBrandRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrandCallback} callback Node-style callback called with the error, if any, and Brand - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.createBrand = function createBrand(request, callback) { - return this.rpcCall(createBrand, $root.google.cloud.iap.v1.CreateBrandRequest, $root.google.cloud.iap.v1.Brand, request, callback); - }, "name", { value: "CreateBrand" }); - - /** - * Calls CreateBrand. - * @function createBrand - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.ICreateBrandRequest} request CreateBrandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getBrand}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef GetBrandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.Brand} [response] Brand - */ - - /** - * Calls GetBrand. - * @function getBrand - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IGetBrandRequest} request GetBrandRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrandCallback} callback Node-style callback called with the error, if any, and Brand - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.getBrand = function getBrand(request, callback) { - return this.rpcCall(getBrand, $root.google.cloud.iap.v1.GetBrandRequest, $root.google.cloud.iap.v1.Brand, request, callback); - }, "name", { value: "GetBrand" }); - - /** - * Calls GetBrand. - * @function getBrand - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IGetBrandRequest} request GetBrandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|createIdentityAwareProxyClient}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef CreateIdentityAwareProxyClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient - */ - - /** - * Calls CreateIdentityAwareProxyClient. - * @function createIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest} request CreateIdentityAwareProxyClientRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.createIdentityAwareProxyClient = function createIdentityAwareProxyClient(request, callback) { - return this.rpcCall(createIdentityAwareProxyClient, $root.google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); - }, "name", { value: "CreateIdentityAwareProxyClient" }); - - /** - * Calls CreateIdentityAwareProxyClient. - * @function createIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.ICreateIdentityAwareProxyClientRequest} request CreateIdentityAwareProxyClientRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|listIdentityAwareProxyClients}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef ListIdentityAwareProxyClientsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse} [response] ListIdentityAwareProxyClientsResponse - */ - - /** - * Calls ListIdentityAwareProxyClients. - * @function listIdentityAwareProxyClients - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest} request ListIdentityAwareProxyClientsRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClientsCallback} callback Node-style callback called with the error, if any, and ListIdentityAwareProxyClientsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.listIdentityAwareProxyClients = function listIdentityAwareProxyClients(request, callback) { - return this.rpcCall(listIdentityAwareProxyClients, $root.google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest, $root.google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse, request, callback); - }, "name", { value: "ListIdentityAwareProxyClients" }); - - /** - * Calls ListIdentityAwareProxyClients. - * @function listIdentityAwareProxyClients - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IListIdentityAwareProxyClientsRequest} request ListIdentityAwareProxyClientsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|getIdentityAwareProxyClient}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef GetIdentityAwareProxyClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient - */ - - /** - * Calls GetIdentityAwareProxyClient. - * @function getIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest} request GetIdentityAwareProxyClientRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.getIdentityAwareProxyClient = function getIdentityAwareProxyClient(request, callback) { - return this.rpcCall(getIdentityAwareProxyClient, $root.google.cloud.iap.v1.GetIdentityAwareProxyClientRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); - }, "name", { value: "GetIdentityAwareProxyClient" }); - - /** - * Calls GetIdentityAwareProxyClient. - * @function getIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IGetIdentityAwareProxyClientRequest} request GetIdentityAwareProxyClientRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|resetIdentityAwareProxyClientSecret}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef ResetIdentityAwareProxyClientSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.iap.v1.IdentityAwareProxyClient} [response] IdentityAwareProxyClient - */ - - /** - * Calls ResetIdentityAwareProxyClientSecret. - * @function resetIdentityAwareProxyClientSecret - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest} request ResetIdentityAwareProxyClientSecretRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecretCallback} callback Node-style callback called with the error, if any, and IdentityAwareProxyClient - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.resetIdentityAwareProxyClientSecret = function resetIdentityAwareProxyClientSecret(request, callback) { - return this.rpcCall(resetIdentityAwareProxyClientSecret, $root.google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest, $root.google.cloud.iap.v1.IdentityAwareProxyClient, request, callback); - }, "name", { value: "ResetIdentityAwareProxyClientSecret" }); - - /** - * Calls ResetIdentityAwareProxyClientSecret. - * @function resetIdentityAwareProxyClientSecret - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IResetIdentityAwareProxyClientSecretRequest} request ResetIdentityAwareProxyClientSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.iap.v1.IdentityAwareProxyOAuthService|deleteIdentityAwareProxyClient}. - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @typedef DeleteIdentityAwareProxyClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteIdentityAwareProxyClient. - * @function deleteIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest} request DeleteIdentityAwareProxyClientRequest message or plain object - * @param {google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClientCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IdentityAwareProxyOAuthService.prototype.deleteIdentityAwareProxyClient = function deleteIdentityAwareProxyClient(request, callback) { - return this.rpcCall(deleteIdentityAwareProxyClient, $root.google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteIdentityAwareProxyClient" }); - - /** - * Calls DeleteIdentityAwareProxyClient. - * @function deleteIdentityAwareProxyClient - * @memberof google.cloud.iap.v1.IdentityAwareProxyOAuthService - * @instance - * @param {google.cloud.iap.v1.IDeleteIdentityAwareProxyClientRequest} request DeleteIdentityAwareProxyClientRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return IdentityAwareProxyOAuthService; - })(); - v1.ListBrandsRequest = (function() { /** diff --git a/packages/google-cloud-iap/protos/protos.json b/packages/google-cloud-iap/protos/protos.json index 23a5269bba8..2a0980accd3 100644 --- a/packages/google-cloud-iap/protos/protos.json +++ b/packages/google-cloud-iap/protos/protos.json @@ -198,6 +198,132 @@ } } }, + "IdentityAwareProxyOAuthService": { + "options": { + "(google.api.default_host)": "iap.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListBrands": { + "requestType": "ListBrandsRequest", + "responseType": "ListBrandsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/brands" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/brands" + } + } + ] + }, + "CreateBrand": { + "requestType": "CreateBrandRequest", + "responseType": "Brand", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/brands", + "(google.api.http).body": "brand" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/brands", + "body": "brand" + } + } + ] + }, + "GetBrand": { + "requestType": "GetBrandRequest", + "responseType": "Brand", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/brands/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/brands/*}" + } + } + ] + }, + "CreateIdentityAwareProxyClient": { + "requestType": "CreateIdentityAwareProxyClientRequest", + "responseType": "IdentityAwareProxyClient", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients", + "(google.api.http).body": "identity_aware_proxy_client" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients", + "body": "identity_aware_proxy_client" + } + } + ] + }, + "ListIdentityAwareProxyClients": { + "requestType": "ListIdentityAwareProxyClientsRequest", + "responseType": "ListIdentityAwareProxyClientsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" + } + } + ] + }, + "GetIdentityAwareProxyClient": { + "requestType": "GetIdentityAwareProxyClientRequest", + "responseType": "IdentityAwareProxyClient", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + } + } + ] + }, + "ResetIdentityAwareProxyClientSecret": { + "requestType": "ResetIdentityAwareProxyClientSecretRequest", + "responseType": "IdentityAwareProxyClient", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret", + "body": "*" + } + } + ] + }, + "DeleteIdentityAwareProxyClient": { + "requestType": "DeleteIdentityAwareProxyClientRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" + } + } + ] + } + } + }, "ListTunnelDestGroupsRequest": { "fields": { "parent": { @@ -451,7 +577,8 @@ "METHOD_UNSPECIFIED": 0, "LOGIN": 1, "PASSWORD": 2, - "SECURE_KEY": 3 + "SECURE_KEY": 3, + "ENROLLED_SECOND_FACTORS": 4 } }, "PolicyType": { @@ -585,132 +712,6 @@ } } }, - "IdentityAwareProxyOAuthService": { - "options": { - "(google.api.default_host)": "iap.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListBrands": { - "requestType": "ListBrandsRequest", - "responseType": "ListBrandsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/brands" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*}/brands" - } - } - ] - }, - "CreateBrand": { - "requestType": "CreateBrandRequest", - "responseType": "Brand", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/brands", - "(google.api.http).body": "brand" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*}/brands", - "body": "brand" - } - } - ] - }, - "GetBrand": { - "requestType": "GetBrandRequest", - "responseType": "Brand", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/brands/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/brands/*}" - } - } - ] - }, - "CreateIdentityAwareProxyClient": { - "requestType": "CreateIdentityAwareProxyClientRequest", - "responseType": "IdentityAwareProxyClient", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients", - "(google.api.http).body": "identity_aware_proxy_client" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients", - "body": "identity_aware_proxy_client" - } - } - ] - }, - "ListIdentityAwareProxyClients": { - "requestType": "ListIdentityAwareProxyClientsRequest", - "responseType": "ListIdentityAwareProxyClientsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/brands/*}/identityAwareProxyClients" - } - } - ] - }, - "GetIdentityAwareProxyClient": { - "requestType": "GetIdentityAwareProxyClientRequest", - "responseType": "IdentityAwareProxyClient", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - } - } - ] - }, - "ResetIdentityAwareProxyClientSecret": { - "requestType": "ResetIdentityAwareProxyClientSecretRequest", - "responseType": "IdentityAwareProxyClient", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret", - "body": "*" - } - } - ] - }, - "DeleteIdentityAwareProxyClient": { - "requestType": "DeleteIdentityAwareProxyClientRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}" - } - } - ] - } - } - }, "ListBrandsRequest": { "fields": { "parent": { diff --git a/packages/google-cloud-iap/samples/generated/v1/identity_aware_proxy_admin_service.update_iap_settings.js b/packages/google-cloud-iap/samples/generated/v1/identity_aware_proxy_admin_service.update_iap_settings.js index 6b90296261d..90b85195e53 100644 --- a/packages/google-cloud-iap/samples/generated/v1/identity_aware_proxy_admin_service.update_iap_settings.js +++ b/packages/google-cloud-iap/samples/generated/v1/identity_aware_proxy_admin_service.update_iap_settings.js @@ -36,8 +36,10 @@ function main(iapSettings) { // const iapSettings = {} /** * The field mask specifying which IAP settings should be updated. - * If omitted, the all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If omitted, then all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * Note: All IAP reauth settings must always be set together, using the + * field mask: `iapSettings.accessSettings.reauthSettings`. */ // const updateMask = {} diff --git a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json index 47756ccb6ae..35c1d77429e 100644 --- a/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json +++ b/packages/google-cloud-iap/samples/generated/v1/snippet_metadata.google.cloud.iap.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "2.2.0", + "version": "2.2.1", "language": "TYPESCRIPT", "apis": [ { @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 63, "type": "FULL" } ], diff --git a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json index dca0e256496..bba9ff81dc0 100644 --- a/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json +++ b/packages/google-cloud-iap/samples/generated/v1beta1/snippet_metadata.google.cloud.iap.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-iap", - "version": "2.2.0", + "version": "2.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts b/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts index d40feac81ad..b1ef5a038f8 100644 --- a/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts +++ b/packages/google-cloud-iap/src/v1/identity_aware_proxy_admin_service_client.ts @@ -722,8 +722,11 @@ export class IdentityAwareProxyAdminServiceClient { * resource. * @param {google.protobuf.FieldMask} request.updateMask * The field mask specifying which IAP settings should be updated. - * If omitted, the all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If omitted, then all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * + * Note: All IAP reauth settings must always be set together, using the + * field mask: `iapSettings.accessSettings.reauthSettings`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array.