diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 29c8b963751d..d69c120422dd 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -727,6 +727,13 @@ pom import + + com.google.cloud + google-cloud-ftp-bom + 0.1.0-SNAPSHOT + pom + import + com.google.cloud google-cloud-functions-bom diff --git a/java-ftp/.repo-metadata.json b/java-ftp/.repo-metadata.json new file mode 100644 index 000000000000..83c54006f668 --- /dev/null +++ b/java-ftp/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "api_shortname": "ftp", + "name_pretty": "Cloud FTP", + "product_documentation": "https://docs.cloud.google.com/cloud-ftp", + "api_description": "A managed, cloud-native solution to move data in and out of Google Cloud by\nusing SSH File Transfer Protocol (SFTP).", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-ftp/latest/overview", + "release_level": "preview", + "transport": "rest", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-ftp", + "distribution_name": "com.google.cloud:google-cloud-ftp", + "api_id": "ftp.googleapis.com", + "library_type": "GAPIC_AUTO" +} \ No newline at end of file diff --git a/java-ftp/README.md b/java-ftp/README.md new file mode 100644 index 000000000000..3f668b6a29cc --- /dev/null +++ b/java-ftp/README.md @@ -0,0 +1,211 @@ +# Google Cloud FTP Client for Java + +Java idiomatic client for [Cloud FTP][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.86.0 + pom + import + + + + + + + com.google.cloud + google-cloud-ftp + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.cloud + google-cloud-ftp + 0.0.0 + +``` + +If you are using Gradle 5.x or later, add this to your dependencies: + +```Groovy +implementation platform('com.google.cloud:libraries-bom:26.86.0') + +implementation 'com.google.cloud:google-cloud-ftp' +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-ftp:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-ftp" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Cloud FTP APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Cloud FTP API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Cloud FTP [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Cloud FTP. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-ftp` library. See the [Quickstart](#quickstart) section +to add `google-cloud-ftp` as a dependency in your code. + +## About Cloud FTP + + +[Cloud FTP][product-docs] A managed, cloud-native solution to move data in and out of Google Cloud by +using SSH File Transfer Protocol (SFTP). + +See the [Cloud FTP client library docs][javadocs] to learn how to +use this Cloud FTP Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Cloud FTP uses HTTP/JSON for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://docs.cloud.google.com/cloud-ftp +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-ftp/latest/overview +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-ftp.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-ftp/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=ftp.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-ftp/google-cloud-ftp-bom/pom.xml b/java-ftp/google-cloud-ftp-bom/pom.xml new file mode 100644 index 000000000000..45bee5a7d26b --- /dev/null +++ b/java-ftp/google-cloud-ftp-bom/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + com.google.cloud + google-cloud-ftp-bom + 0.1.0-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.90.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Cloud FTP BOM + + BOM for Cloud FTP + + + + true + + + + + + + com.google.cloud + google-cloud-ftp + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-ftp-v1 + 0.1.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/java-ftp/google-cloud-ftp/pom.xml b/java-ftp/google-cloud-ftp/pom.xml new file mode 100644 index 000000000000..60328787e8e3 --- /dev/null +++ b/java-ftp/google-cloud-ftp/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.cloud + google-cloud-ftp + 0.1.0-SNAPSHOT + jar + Google Cloud FTP + Cloud FTP A managed, cloud-native solution to move data in and out of Google Cloud by +using SSH File Transfer Protocol (SFTP). + + com.google.cloud + google-cloud-ftp-parent + 0.1.0-SNAPSHOT + + + google-cloud-ftp + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-ftp-v1 + + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + proto-google-iam-v1 + + + org.threeten + threetenbp + + + + + com.google.api.grpc + grpc-google-common-protos + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + junit + junit + test + + + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/CloudFtpClient.java b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/CloudFtpClient.java new file mode 100644 index 000000000000..fdc87f33e546 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/CloudFtpClient.java @@ -0,0 +1,2575 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.ftp.v1.stub.CloudFtpStub; +import com.google.cloud.ftp.v1.stub.CloudFtpStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service describing handlers for resources + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+ *   ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]");
+ *   Server response = cloudFtpClient.getServer(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the CloudFtpClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

ListServers

Lists Servers in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listServers(ListServersRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listServers(LocationName parent) + *

  • listServers(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listServersPagedCallable() + *

  • listServersCallable() + *

+ *

GetServer

Gets details of a single Server.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getServer(GetServerRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getServer(ServerName name) + *

  • getServer(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getServerCallable() + *

+ *

CreateServer

Creates a new Server in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createServerAsync(CreateServerRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createServerAsync(LocationName parent, Server server, String serverId) + *

  • createServerAsync(String parent, Server server, String serverId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createServerOperationCallable() + *

  • createServerCallable() + *

+ *

UpdateServer

Updates the parameters of a single Server.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateServerAsync(UpdateServerRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateServerAsync(Server server, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateServerOperationCallable() + *

  • updateServerCallable() + *

+ *

DeleteServer

Deletes a single Server.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteServerAsync(DeleteServerRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteServerAsync(ServerName name) + *

  • deleteServerAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteServerOperationCallable() + *

  • deleteServerCallable() + *

+ *

ListUsers

Lists Users in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listUsers(ListUsersRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listUsers(ServerName parent) + *

  • listUsers(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listUsersPagedCallable() + *

  • listUsersCallable() + *

+ *

GetUser

Gets details of a single User.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getUser(GetUserRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getUser(UserName name) + *

  • getUser(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getUserCallable() + *

+ *

CreateUser

Creates a new User in a given project and location and Server.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createUserAsync(CreateUserRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createUserAsync(ServerName parent, User user, String userId) + *

  • createUserAsync(String parent, User user, String userId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createUserOperationCallable() + *

  • createUserCallable() + *

+ *

UpdateUser

Updates the parameters of a single User.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateUserAsync(UpdateUserRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateUserAsync(User user, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateUserOperationCallable() + *

  • updateUserCallable() + *

+ *

DeleteUser

Deletes a single User.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteUserAsync(DeleteUserRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteUserAsync(UserName name) + *

  • deleteUserAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteUserOperationCallable() + *

  • deleteUserCallable() + *

+ *

StartServer

Starts a stopping/stopped Server.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • startServerAsync(StartServerRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • startServerAsync(ServerName name) + *

  • startServerAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • startServerOperationCallable() + *

  • startServerCallable() + *

+ *

StopServer

Stops an active Server.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • stopServerAsync(StopServerRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • stopServerAsync(ServerName name) + *

  • stopServerAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • stopServerOperationCallable() + *

  • stopServerCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service. + *

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of CloudFtpSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudFtpSettings cloudFtpSettings =
+ *     CloudFtpSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CloudFtpClient cloudFtpClient = CloudFtpClient.create(cloudFtpSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudFtpSettings cloudFtpSettings =
+ *     CloudFtpSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudFtpClient cloudFtpClient = CloudFtpClient.create(cloudFtpSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class CloudFtpClient implements BackgroundResource { + private final @Nullable CloudFtpSettings settings; + private final CloudFtpStub stub; + private final OperationsClient httpJsonOperationsClient; + + /** Constructs an instance of CloudFtpClient with default settings. */ + public static final CloudFtpClient create() throws IOException { + return create(CloudFtpSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CloudFtpClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final CloudFtpClient create(CloudFtpSettings settings) throws IOException { + return new CloudFtpClient(settings); + } + + /** + * Constructs an instance of CloudFtpClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(CloudFtpSettings). + */ + public static final CloudFtpClient create(CloudFtpStub stub) { + return new CloudFtpClient(stub); + } + + /** + * Constructs an instance of CloudFtpClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected CloudFtpClient(CloudFtpSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CloudFtpStubSettings) settings.getStubSettings()).createStub(); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected CloudFtpClient(CloudFtpStub stub) { + this.settings = null; + this.stub = stub; + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final @Nullable CloudFtpSettings getSettings() { + return settings; + } + + public CloudFtpStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Servers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Server element : cloudFtpClient.listServers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListServersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServersPagedResponse listServers(@Nullable LocationName parent) { + ListServersRequest request = + ListServersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Servers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Server element : cloudFtpClient.listServers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListServersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServersPagedResponse listServers(String parent) { + ListServersRequest request = ListServersRequest.newBuilder().setParent(parent).build(); + return listServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Servers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListServersRequest request =
+   *       ListServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ServerView.forNumber(0))
+   *           .build();
+   *   for (Server element : cloudFtpClient.listServers(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServersPagedResponse listServers(ListServersRequest request) { + return listServersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Servers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListServersRequest request =
+   *       ListServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ServerView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.listServersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Server element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServersPagedCallable() { + return stub.listServersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Servers in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListServersRequest request =
+   *       ListServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(ServerView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListServersResponse response = cloudFtpClient.listServersCallable().call(request);
+   *     for (Server element : response.getServersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listServersCallable() { + return stub.listServersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]");
+   *   Server response = cloudFtpClient.getServer(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Server getServer(@Nullable ServerName name) { + GetServerRequest request = + GetServerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getServer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString();
+   *   Server response = cloudFtpClient.getServer(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Server getServer(String name) { + GetServerRequest request = GetServerRequest.newBuilder().setName(name).build(); + return getServer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   GetServerRequest request =
+   *       GetServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .setView(ServerView.forNumber(0))
+   *           .build();
+   *   Server response = cloudFtpClient.getServer(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Server getServer(GetServerRequest request) { + return getServerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   GetServerRequest request =
+   *       GetServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .setView(ServerView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.getServerCallable().futureCall(request);
+   *   // Do something.
+   *   Server response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServerCallable() { + return stub.getServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Server in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Server server = Server.newBuilder().build();
+   *   String serverId = "serverId1379103678";
+   *   Server response = cloudFtpClient.createServerAsync(parent, server, serverId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param server Required. The resource being created + * @param serverId Required. A unique ID for the server. Must start with a lowercase letter, and + * end with a lowercase letter or number. Can contain lowercase letters, numbers, and hyphens. + * Maximum length is 30 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createServerAsync( + @Nullable LocationName parent, Server server, String serverId) { + CreateServerRequest request = + CreateServerRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setServer(server) + .setServerId(serverId) + .build(); + return createServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Server in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Server server = Server.newBuilder().build();
+   *   String serverId = "serverId1379103678";
+   *   Server response = cloudFtpClient.createServerAsync(parent, server, serverId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param server Required. The resource being created + * @param serverId Required. A unique ID for the server. Must start with a lowercase letter, and + * end with a lowercase letter or number. Can contain lowercase letters, numbers, and hyphens. + * Maximum length is 30 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createServerAsync( + String parent, Server server, String serverId) { + CreateServerRequest request = + CreateServerRequest.newBuilder() + .setParent(parent) + .setServer(server) + .setServerId(serverId) + .build(); + return createServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Server in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   CreateServerRequest request =
+   *       CreateServerRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServerId("serverId1379103678")
+   *           .setServer(Server.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Server response = cloudFtpClient.createServerAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createServerAsync( + CreateServerRequest request) { + return createServerOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Server in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   CreateServerRequest request =
+   *       CreateServerRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServerId("serverId1379103678")
+   *           .setServer(Server.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudFtpClient.createServerOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Server response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createServerOperationCallable() { + return stub.createServerOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Server in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   CreateServerRequest request =
+   *       CreateServerRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setServerId("serverId1379103678")
+   *           .setServer(Server.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.createServerCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createServerCallable() { + return stub.createServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   Server server = Server.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Server response = cloudFtpClient.updateServerAsync(server, updateMask).get();
+   * }
+   * }
+ * + * @param server Required. The resource being updated + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Server resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateServerAsync( + Server server, FieldMask updateMask) { + UpdateServerRequest request = + UpdateServerRequest.newBuilder().setServer(server).setUpdateMask(updateMask).build(); + return updateServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   UpdateServerRequest request =
+   *       UpdateServerRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setServer(Server.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Server response = cloudFtpClient.updateServerAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateServerAsync( + UpdateServerRequest request) { + return updateServerOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   UpdateServerRequest request =
+   *       UpdateServerRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setServer(Server.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudFtpClient.updateServerOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Server response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateServerOperationCallable() { + return stub.updateServerOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   UpdateServerRequest request =
+   *       UpdateServerRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setServer(Server.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.updateServerCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateServerCallable() { + return stub.updateServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]");
+   *   cloudFtpClient.deleteServerAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServerAsync( + @Nullable ServerName name) { + DeleteServerRequest request = + DeleteServerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString();
+   *   cloudFtpClient.deleteServerAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServerAsync(String name) { + DeleteServerRequest request = DeleteServerRequest.newBuilder().setName(name).build(); + return deleteServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   DeleteServerRequest request =
+   *       DeleteServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   cloudFtpClient.deleteServerAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServerAsync( + DeleteServerRequest request) { + return deleteServerOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   DeleteServerRequest request =
+   *       DeleteServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       cloudFtpClient.deleteServerOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteServerOperationCallable() { + return stub.deleteServerOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   DeleteServerRequest request =
+   *       DeleteServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.deleteServerCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteServerCallable() { + return stub.deleteServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ServerName parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]");
+   *   for (User element : cloudFtpClient.listUsers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListUsersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUsersPagedResponse listUsers(@Nullable ServerName parent) { + ListUsersRequest request = + ListUsersRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listUsers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString();
+   *   for (User element : cloudFtpClient.listUsers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListUsersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUsersPagedResponse listUsers(String parent) { + ListUsersRequest request = ListUsersRequest.newBuilder().setParent(parent).build(); + return listUsers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListUsersRequest request =
+   *       ListUsersRequest.newBuilder()
+   *           .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(UserView.forNumber(0))
+   *           .build();
+   *   for (User element : cloudFtpClient.listUsers(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUsersPagedResponse listUsers(ListUsersRequest request) { + return listUsersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListUsersRequest request =
+   *       ListUsersRequest.newBuilder()
+   *           .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(UserView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.listUsersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (User element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listUsersPagedCallable() { + return stub.listUsersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListUsersRequest request =
+   *       ListUsersRequest.newBuilder()
+   *           .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(UserView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListUsersResponse response = cloudFtpClient.listUsersCallable().call(request);
+   *     for (User element : response.getUsersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listUsersCallable() { + return stub.listUsersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]");
+   *   User response = cloudFtpClient.getUser(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final User getUser(@Nullable UserName name) { + GetUserRequest request = + GetUserRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getUser(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString();
+   *   User response = cloudFtpClient.getUser(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final User getUser(String name) { + GetUserRequest request = GetUserRequest.newBuilder().setName(name).build(); + return getUser(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   GetUserRequest request =
+   *       GetUserRequest.newBuilder()
+   *           .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString())
+   *           .setView(UserView.forNumber(0))
+   *           .build();
+   *   User response = cloudFtpClient.getUser(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final User getUser(GetUserRequest request) { + return getUserCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   GetUserRequest request =
+   *       GetUserRequest.newBuilder()
+   *           .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString())
+   *           .setView(UserView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.getUserCallable().futureCall(request);
+   *   // Do something.
+   *   User response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getUserCallable() { + return stub.getUserCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new User in a given project and location and Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ServerName parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]");
+   *   User user = User.newBuilder().build();
+   *   String userId = "userId-836030906";
+   *   User response = cloudFtpClient.createUserAsync(parent, user, userId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param user Required. The resource being created + * @param userId Required. A unique user ID for the SFTP user. The user ID must start with a + * lowercase letter and can include lowercase letters, numbers, or hyphens. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createUserAsync( + @Nullable ServerName parent, User user, String userId) { + CreateUserRequest request = + CreateUserRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setUser(user) + .setUserId(userId) + .build(); + return createUserAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new User in a given project and location and Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString();
+   *   User user = User.newBuilder().build();
+   *   String userId = "userId-836030906";
+   *   User response = cloudFtpClient.createUserAsync(parent, user, userId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param user Required. The resource being created + * @param userId Required. A unique user ID for the SFTP user. The user ID must start with a + * lowercase letter and can include lowercase letters, numbers, or hyphens. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createUserAsync( + String parent, User user, String userId) { + CreateUserRequest request = + CreateUserRequest.newBuilder().setParent(parent).setUser(user).setUserId(userId).build(); + return createUserAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new User in a given project and location and Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   CreateUserRequest request =
+   *       CreateUserRequest.newBuilder()
+   *           .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .setUserId("userId-836030906")
+   *           .setUser(User.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   User response = cloudFtpClient.createUserAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createUserAsync(CreateUserRequest request) { + return createUserOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new User in a given project and location and Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   CreateUserRequest request =
+   *       CreateUserRequest.newBuilder()
+   *           .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .setUserId("userId-836030906")
+   *           .setUser(User.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudFtpClient.createUserOperationCallable().futureCall(request);
+   *   // Do something.
+   *   User response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createUserOperationCallable() { + return stub.createUserOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new User in a given project and location and Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   CreateUserRequest request =
+   *       CreateUserRequest.newBuilder()
+   *           .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .setUserId("userId-836030906")
+   *           .setUser(User.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.createUserCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createUserCallable() { + return stub.createUserCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   User user = User.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   User response = cloudFtpClient.updateUserAsync(user, updateMask).get();
+   * }
+   * }
+ * + * @param user Required. The resource being updated + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * User resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateUserAsync( + User user, FieldMask updateMask) { + UpdateUserRequest request = + UpdateUserRequest.newBuilder().setUser(user).setUpdateMask(updateMask).build(); + return updateUserAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   UpdateUserRequest request =
+   *       UpdateUserRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setUser(User.newBuilder().build())
+   *           .build();
+   *   User response = cloudFtpClient.updateUserAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateUserAsync(UpdateUserRequest request) { + return updateUserOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   UpdateUserRequest request =
+   *       UpdateUserRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setUser(User.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       cloudFtpClient.updateUserOperationCallable().futureCall(request);
+   *   // Do something.
+   *   User response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateUserOperationCallable() { + return stub.updateUserOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   UpdateUserRequest request =
+   *       UpdateUserRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setUser(User.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.updateUserCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateUserCallable() { + return stub.updateUserCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]");
+   *   cloudFtpClient.deleteUserAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteUserAsync(@Nullable UserName name) { + DeleteUserRequest request = + DeleteUserRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteUserAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString();
+   *   cloudFtpClient.deleteUserAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteUserAsync(String name) { + DeleteUserRequest request = DeleteUserRequest.newBuilder().setName(name).build(); + return deleteUserAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   DeleteUserRequest request =
+   *       DeleteUserRequest.newBuilder()
+   *           .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   cloudFtpClient.deleteUserAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteUserAsync( + DeleteUserRequest request) { + return deleteUserOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   DeleteUserRequest request =
+   *       DeleteUserRequest.newBuilder()
+   *           .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudFtpClient.deleteUserOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteUserOperationCallable() { + return stub.deleteUserOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   DeleteUserRequest request =
+   *       DeleteUserRequest.newBuilder()
+   *           .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.deleteUserCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteUserCallable() { + return stub.deleteUserCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a stopping/stopped Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]");
+   *   Server response = cloudFtpClient.startServerAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource Format: + * `projects/{project}/locations/{location}/servers/{server}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture startServerAsync( + @Nullable ServerName name) { + StartServerRequest request = + StartServerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return startServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a stopping/stopped Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString();
+   *   Server response = cloudFtpClient.startServerAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource Format: + * `projects/{project}/locations/{location}/servers/{server}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture startServerAsync(String name) { + StartServerRequest request = StartServerRequest.newBuilder().setName(name).build(); + return startServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a stopping/stopped Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   StartServerRequest request =
+   *       StartServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   Server response = cloudFtpClient.startServerAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture startServerAsync( + StartServerRequest request) { + return startServerOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a stopping/stopped Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   StartServerRequest request =
+   *       StartServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       cloudFtpClient.startServerOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Server response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + startServerOperationCallable() { + return stub.startServerOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a stopping/stopped Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   StartServerRequest request =
+   *       StartServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.startServerCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable startServerCallable() { + return stub.startServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an active Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]");
+   *   Server response = cloudFtpClient.stopServerAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. Format: + * `projects/{project}/locations/{location}/servers/{server}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture stopServerAsync( + @Nullable ServerName name) { + StopServerRequest request = + StopServerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return stopServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an active Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   String name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString();
+   *   Server response = cloudFtpClient.stopServerAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. Format: + * `projects/{project}/locations/{location}/servers/{server}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture stopServerAsync(String name) { + StopServerRequest request = StopServerRequest.newBuilder().setName(name).build(); + return stopServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an active Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   StopServerRequest request =
+   *       StopServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   Server response = cloudFtpClient.stopServerAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture stopServerAsync( + StopServerRequest request) { + return stopServerOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an active Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   StopServerRequest request =
+   *       StopServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       cloudFtpClient.stopServerOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Server response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + stopServerOperationCallable() { + return stub.stopServerOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops an active Server. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   StopServerRequest request =
+   *       StopServerRequest.newBuilder()
+   *           .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString())
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.stopServerCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable stopServerCallable() { + return stub.stopServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudFtpClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = cloudFtpClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = cloudFtpClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudFtpClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = cloudFtpClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListServersPagedResponse + extends AbstractPagedListResponse< + ListServersRequest, + ListServersResponse, + Server, + ListServersPage, + ListServersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListServersPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListServersPagedResponse(ListServersPage page) { + super(page, ListServersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServersPage + extends AbstractPage { + + private ListServersPage( + @Nullable PageContext context, + @Nullable ListServersResponse response) { + super(context, response); + } + + private static ListServersPage createEmptyPage() { + return new ListServersPage(null, null); + } + + @Override + protected ListServersPage createPage( + @Nullable PageContext context, + @Nullable ListServersResponse response) { + return new ListServersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServersRequest, + ListServersResponse, + Server, + ListServersPage, + ListServersFixedSizeCollection> { + + private ListServersFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServersFixedSizeCollection createEmptyCollection() { + return new ListServersFixedSizeCollection(null, 0); + } + + @Override + protected ListServersFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListServersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListUsersPagedResponse + extends AbstractPagedListResponse< + ListUsersRequest, ListUsersResponse, User, ListUsersPage, ListUsersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListUsersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListUsersPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListUsersPagedResponse(ListUsersPage page) { + super(page, ListUsersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListUsersPage + extends AbstractPage { + + private ListUsersPage( + @Nullable PageContext context, + @Nullable ListUsersResponse response) { + super(context, response); + } + + private static ListUsersPage createEmptyPage() { + return new ListUsersPage(null, null); + } + + @Override + protected ListUsersPage createPage( + @Nullable PageContext context, + @Nullable ListUsersResponse response) { + return new ListUsersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListUsersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListUsersRequest, ListUsersResponse, User, ListUsersPage, ListUsersFixedSizeCollection> { + + private ListUsersFixedSizeCollection(@Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListUsersFixedSizeCollection createEmptyCollection() { + return new ListUsersFixedSizeCollection(null, 0); + } + + @Override + protected ListUsersFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListUsersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + @Nullable PageContext context, + @Nullable ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + @Nullable PageContext context, + @Nullable ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/CloudFtpSettings.java b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/CloudFtpSettings.java new file mode 100644 index 000000000000..237e26a41011 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/CloudFtpSettings.java @@ -0,0 +1,470 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1; + +import static com.google.cloud.ftp.v1.CloudFtpClient.ListLocationsPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListServersPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListUsersPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.ftp.v1.stub.CloudFtpStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudFtpClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (ftp.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getServer: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudFtpSettings.Builder cloudFtpSettingsBuilder = CloudFtpSettings.newBuilder();
+ * cloudFtpSettingsBuilder
+ *     .getServerSettings()
+ *     .setRetrySettings(
+ *         cloudFtpSettingsBuilder
+ *             .getServerSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * CloudFtpSettings cloudFtpSettings = cloudFtpSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createServer: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudFtpSettings.Builder cloudFtpSettingsBuilder = CloudFtpSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * cloudFtpSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@NullMarked +@Generated("by gapic-generator-java") +public class CloudFtpSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listServers. */ + public PagedCallSettings + listServersSettings() { + return ((CloudFtpStubSettings) getStubSettings()).listServersSettings(); + } + + /** Returns the object with the settings used for calls to getServer. */ + public UnaryCallSettings getServerSettings() { + return ((CloudFtpStubSettings) getStubSettings()).getServerSettings(); + } + + /** Returns the object with the settings used for calls to createServer. */ + public UnaryCallSettings createServerSettings() { + return ((CloudFtpStubSettings) getStubSettings()).createServerSettings(); + } + + /** Returns the object with the settings used for calls to createServer. */ + public OperationCallSettings + createServerOperationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).createServerOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateServer. */ + public UnaryCallSettings updateServerSettings() { + return ((CloudFtpStubSettings) getStubSettings()).updateServerSettings(); + } + + /** Returns the object with the settings used for calls to updateServer. */ + public OperationCallSettings + updateServerOperationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).updateServerOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteServer. */ + public UnaryCallSettings deleteServerSettings() { + return ((CloudFtpStubSettings) getStubSettings()).deleteServerSettings(); + } + + /** Returns the object with the settings used for calls to deleteServer. */ + public OperationCallSettings + deleteServerOperationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).deleteServerOperationSettings(); + } + + /** Returns the object with the settings used for calls to listUsers. */ + public PagedCallSettings + listUsersSettings() { + return ((CloudFtpStubSettings) getStubSettings()).listUsersSettings(); + } + + /** Returns the object with the settings used for calls to getUser. */ + public UnaryCallSettings getUserSettings() { + return ((CloudFtpStubSettings) getStubSettings()).getUserSettings(); + } + + /** Returns the object with the settings used for calls to createUser. */ + public UnaryCallSettings createUserSettings() { + return ((CloudFtpStubSettings) getStubSettings()).createUserSettings(); + } + + /** Returns the object with the settings used for calls to createUser. */ + public OperationCallSettings + createUserOperationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).createUserOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateUser. */ + public UnaryCallSettings updateUserSettings() { + return ((CloudFtpStubSettings) getStubSettings()).updateUserSettings(); + } + + /** Returns the object with the settings used for calls to updateUser. */ + public OperationCallSettings + updateUserOperationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).updateUserOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteUser. */ + public UnaryCallSettings deleteUserSettings() { + return ((CloudFtpStubSettings) getStubSettings()).deleteUserSettings(); + } + + /** Returns the object with the settings used for calls to deleteUser. */ + public OperationCallSettings + deleteUserOperationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).deleteUserOperationSettings(); + } + + /** Returns the object with the settings used for calls to startServer. */ + public UnaryCallSettings startServerSettings() { + return ((CloudFtpStubSettings) getStubSettings()).startServerSettings(); + } + + /** Returns the object with the settings used for calls to startServer. */ + public OperationCallSettings + startServerOperationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).startServerOperationSettings(); + } + + /** Returns the object with the settings used for calls to stopServer. */ + public UnaryCallSettings stopServerSettings() { + return ((CloudFtpStubSettings) getStubSettings()).stopServerSettings(); + } + + /** Returns the object with the settings used for calls to stopServer. */ + public OperationCallSettings + stopServerOperationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).stopServerOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudFtpStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudFtpStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final CloudFtpSettings create(CloudFtpStubSettings stub) throws IOException { + return new CloudFtpSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CloudFtpStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CloudFtpStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CloudFtpStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CloudFtpStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return CloudFtpStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CloudFtpStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudFtpStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CloudFtpSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CloudFtpSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(CloudFtpStubSettings.newBuilder(clientContext)); + } + + protected Builder(CloudFtpSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CloudFtpStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CloudFtpStubSettings.newBuilder()); + } + + public CloudFtpStubSettings.Builder getStubSettingsBuilder() { + return ((CloudFtpStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listServers. */ + public PagedCallSettings.Builder< + ListServersRequest, ListServersResponse, ListServersPagedResponse> + listServersSettings() { + return getStubSettingsBuilder().listServersSettings(); + } + + /** Returns the builder for the settings used for calls to getServer. */ + public UnaryCallSettings.Builder getServerSettings() { + return getStubSettingsBuilder().getServerSettings(); + } + + /** Returns the builder for the settings used for calls to createServer. */ + public UnaryCallSettings.Builder createServerSettings() { + return getStubSettingsBuilder().createServerSettings(); + } + + /** Returns the builder for the settings used for calls to createServer. */ + public OperationCallSettings.Builder + createServerOperationSettings() { + return getStubSettingsBuilder().createServerOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateServer. */ + public UnaryCallSettings.Builder updateServerSettings() { + return getStubSettingsBuilder().updateServerSettings(); + } + + /** Returns the builder for the settings used for calls to updateServer. */ + public OperationCallSettings.Builder + updateServerOperationSettings() { + return getStubSettingsBuilder().updateServerOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteServer. */ + public UnaryCallSettings.Builder deleteServerSettings() { + return getStubSettingsBuilder().deleteServerSettings(); + } + + /** Returns the builder for the settings used for calls to deleteServer. */ + public OperationCallSettings.Builder + deleteServerOperationSettings() { + return getStubSettingsBuilder().deleteServerOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listUsers. */ + public PagedCallSettings.Builder + listUsersSettings() { + return getStubSettingsBuilder().listUsersSettings(); + } + + /** Returns the builder for the settings used for calls to getUser. */ + public UnaryCallSettings.Builder getUserSettings() { + return getStubSettingsBuilder().getUserSettings(); + } + + /** Returns the builder for the settings used for calls to createUser. */ + public UnaryCallSettings.Builder createUserSettings() { + return getStubSettingsBuilder().createUserSettings(); + } + + /** Returns the builder for the settings used for calls to createUser. */ + public OperationCallSettings.Builder + createUserOperationSettings() { + return getStubSettingsBuilder().createUserOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateUser. */ + public UnaryCallSettings.Builder updateUserSettings() { + return getStubSettingsBuilder().updateUserSettings(); + } + + /** Returns the builder for the settings used for calls to updateUser. */ + public OperationCallSettings.Builder + updateUserOperationSettings() { + return getStubSettingsBuilder().updateUserOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteUser. */ + public UnaryCallSettings.Builder deleteUserSettings() { + return getStubSettingsBuilder().deleteUserSettings(); + } + + /** Returns the builder for the settings used for calls to deleteUser. */ + public OperationCallSettings.Builder + deleteUserOperationSettings() { + return getStubSettingsBuilder().deleteUserOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startServer. */ + public UnaryCallSettings.Builder startServerSettings() { + return getStubSettingsBuilder().startServerSettings(); + } + + /** Returns the builder for the settings used for calls to startServer. */ + public OperationCallSettings.Builder + startServerOperationSettings() { + return getStubSettingsBuilder().startServerOperationSettings(); + } + + /** Returns the builder for the settings used for calls to stopServer. */ + public UnaryCallSettings.Builder stopServerSettings() { + return getStubSettingsBuilder().stopServerSettings(); + } + + /** Returns the builder for the settings used for calls to stopServer. */ + public OperationCallSettings.Builder + stopServerOperationSettings() { + return getStubSettingsBuilder().stopServerOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public CloudFtpSettings build() throws IOException { + return new CloudFtpSettings(this); + } + } +} diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/gapic_metadata.json b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/gapic_metadata.json new file mode 100644 index 000000000000..5e85cdee860f --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/gapic_metadata.json @@ -0,0 +1,60 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.ftp.v1", + "libraryPackage": "com.google.cloud.ftp.v1", + "services": { + "CloudFtp": { + "clients": { + "grpc": { + "libraryClient": "CloudFtpClient", + "rpcs": { + "CreateServer": { + "methods": ["createServerAsync", "createServerAsync", "createServerAsync", "createServerOperationCallable", "createServerCallable"] + }, + "CreateUser": { + "methods": ["createUserAsync", "createUserAsync", "createUserAsync", "createUserOperationCallable", "createUserCallable"] + }, + "DeleteServer": { + "methods": ["deleteServerAsync", "deleteServerAsync", "deleteServerAsync", "deleteServerOperationCallable", "deleteServerCallable"] + }, + "DeleteUser": { + "methods": ["deleteUserAsync", "deleteUserAsync", "deleteUserAsync", "deleteUserOperationCallable", "deleteUserCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetServer": { + "methods": ["getServer", "getServer", "getServer", "getServerCallable"] + }, + "GetUser": { + "methods": ["getUser", "getUser", "getUser", "getUserCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListServers": { + "methods": ["listServers", "listServers", "listServers", "listServersPagedCallable", "listServersCallable"] + }, + "ListUsers": { + "methods": ["listUsers", "listUsers", "listUsers", "listUsersPagedCallable", "listUsersCallable"] + }, + "StartServer": { + "methods": ["startServerAsync", "startServerAsync", "startServerAsync", "startServerOperationCallable", "startServerCallable"] + }, + "StopServer": { + "methods": ["stopServerAsync", "stopServerAsync", "stopServerAsync", "stopServerOperationCallable", "stopServerCallable"] + }, + "UpdateServer": { + "methods": ["updateServerAsync", "updateServerAsync", "updateServerOperationCallable", "updateServerCallable"] + }, + "UpdateUser": { + "methods": ["updateUserAsync", "updateUserAsync", "updateUserOperationCallable", "updateUserCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/package-info.java b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/package-info.java new file mode 100644 index 000000000000..033b6d20d9e3 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Cloud FTP API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= CloudFtpClient ======================= + * + *

Service Description: Service describing handlers for resources + * + *

Sample for CloudFtpClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) {
+ *   ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]");
+ *   Server response = cloudFtpClient.getServer(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.ftp.v1; + +import javax.annotation.Generated; diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/CloudFtpStub.java b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/CloudFtpStub.java new file mode 100644 index 000000000000..5ef2de9c85e0 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/CloudFtpStub.java @@ -0,0 +1,179 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.stub; + +import static com.google.cloud.ftp.v1.CloudFtpClient.ListLocationsPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListServersPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListUsersPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.ftp.v1.CreateServerRequest; +import com.google.cloud.ftp.v1.CreateUserRequest; +import com.google.cloud.ftp.v1.DeleteServerRequest; +import com.google.cloud.ftp.v1.DeleteUserRequest; +import com.google.cloud.ftp.v1.GetServerRequest; +import com.google.cloud.ftp.v1.GetUserRequest; +import com.google.cloud.ftp.v1.ListServersRequest; +import com.google.cloud.ftp.v1.ListServersResponse; +import com.google.cloud.ftp.v1.ListUsersRequest; +import com.google.cloud.ftp.v1.ListUsersResponse; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.StartServerRequest; +import com.google.cloud.ftp.v1.StopServerRequest; +import com.google.cloud.ftp.v1.UpdateServerRequest; +import com.google.cloud.ftp.v1.UpdateUserRequest; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the CloudFtp service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@Generated("by gapic-generator-java") +public abstract class CloudFtpStub implements BackgroundResource { + + public @Nullable OperationsStub getHttpJsonOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getHttpJsonOperationsStub()"); + } + + public UnaryCallable listServersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServersPagedCallable()"); + } + + public UnaryCallable listServersCallable() { + throw new UnsupportedOperationException("Not implemented: listServersCallable()"); + } + + public UnaryCallable getServerCallable() { + throw new UnsupportedOperationException("Not implemented: getServerCallable()"); + } + + public OperationCallable + createServerOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createServerOperationCallable()"); + } + + public UnaryCallable createServerCallable() { + throw new UnsupportedOperationException("Not implemented: createServerCallable()"); + } + + public OperationCallable + updateServerOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateServerOperationCallable()"); + } + + public UnaryCallable updateServerCallable() { + throw new UnsupportedOperationException("Not implemented: updateServerCallable()"); + } + + public OperationCallable + deleteServerOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServerOperationCallable()"); + } + + public UnaryCallable deleteServerCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServerCallable()"); + } + + public UnaryCallable listUsersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listUsersPagedCallable()"); + } + + public UnaryCallable listUsersCallable() { + throw new UnsupportedOperationException("Not implemented: listUsersCallable()"); + } + + public UnaryCallable getUserCallable() { + throw new UnsupportedOperationException("Not implemented: getUserCallable()"); + } + + public OperationCallable + createUserOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createUserOperationCallable()"); + } + + public UnaryCallable createUserCallable() { + throw new UnsupportedOperationException("Not implemented: createUserCallable()"); + } + + public OperationCallable + updateUserOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateUserOperationCallable()"); + } + + public UnaryCallable updateUserCallable() { + throw new UnsupportedOperationException("Not implemented: updateUserCallable()"); + } + + public OperationCallable + deleteUserOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteUserOperationCallable()"); + } + + public UnaryCallable deleteUserCallable() { + throw new UnsupportedOperationException("Not implemented: deleteUserCallable()"); + } + + public OperationCallable + startServerOperationCallable() { + throw new UnsupportedOperationException("Not implemented: startServerOperationCallable()"); + } + + public UnaryCallable startServerCallable() { + throw new UnsupportedOperationException("Not implemented: startServerCallable()"); + } + + public OperationCallable + stopServerOperationCallable() { + throw new UnsupportedOperationException("Not implemented: stopServerOperationCallable()"); + } + + public UnaryCallable stopServerCallable() { + throw new UnsupportedOperationException("Not implemented: stopServerCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/CloudFtpStubSettings.java b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/CloudFtpStubSettings.java new file mode 100644 index 000000000000..4bff8c8748e1 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/CloudFtpStubSettings.java @@ -0,0 +1,1179 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.stub; + +import static com.google.cloud.ftp.v1.CloudFtpClient.ListLocationsPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListServersPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListUsersPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.httpjson.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.ftp.v1.CreateServerRequest; +import com.google.cloud.ftp.v1.CreateUserRequest; +import com.google.cloud.ftp.v1.DeleteServerRequest; +import com.google.cloud.ftp.v1.DeleteUserRequest; +import com.google.cloud.ftp.v1.GetServerRequest; +import com.google.cloud.ftp.v1.GetUserRequest; +import com.google.cloud.ftp.v1.ListServersRequest; +import com.google.cloud.ftp.v1.ListServersResponse; +import com.google.cloud.ftp.v1.ListUsersRequest; +import com.google.cloud.ftp.v1.ListUsersResponse; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.StartServerRequest; +import com.google.cloud.ftp.v1.StopServerRequest; +import com.google.cloud.ftp.v1.UpdateServerRequest; +import com.google.cloud.ftp.v1.UpdateUserRequest; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudFtpStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (ftp.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getServer: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudFtpStubSettings.Builder cloudFtpSettingsBuilder = CloudFtpStubSettings.newBuilder();
+ * cloudFtpSettingsBuilder
+ *     .getServerSettings()
+ *     .setRetrySettings(
+ *         cloudFtpSettingsBuilder
+ *             .getServerSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * CloudFtpStubSettings cloudFtpSettings = cloudFtpSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createServer: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudFtpStubSettings.Builder cloudFtpSettingsBuilder = CloudFtpStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * cloudFtpSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@NullMarked +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class CloudFtpStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings + listServersSettings; + private final UnaryCallSettings getServerSettings; + private final UnaryCallSettings createServerSettings; + private final OperationCallSettings + createServerOperationSettings; + private final UnaryCallSettings updateServerSettings; + private final OperationCallSettings + updateServerOperationSettings; + private final UnaryCallSettings deleteServerSettings; + private final OperationCallSettings + deleteServerOperationSettings; + private final PagedCallSettings + listUsersSettings; + private final UnaryCallSettings getUserSettings; + private final UnaryCallSettings createUserSettings; + private final OperationCallSettings + createUserOperationSettings; + private final UnaryCallSettings updateUserSettings; + private final OperationCallSettings + updateUserOperationSettings; + private final UnaryCallSettings deleteUserSettings; + private final OperationCallSettings + deleteUserOperationSettings; + private final UnaryCallSettings startServerSettings; + private final OperationCallSettings + startServerOperationSettings; + private final UnaryCallSettings stopServerSettings; + private final OperationCallSettings + stopServerOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_SERVERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServersRequest injectToken(ListServersRequest payload, String token) { + return ListServersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServersRequest injectPageSize(ListServersRequest payload, int pageSize) { + return ListServersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServersResponse payload) { + return payload.getServersList(); + } + }; + + private static final PagedListDescriptor + LIST_USERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListUsersRequest injectToken(ListUsersRequest payload, String token) { + return ListUsersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListUsersRequest injectPageSize(ListUsersRequest payload, int pageSize) { + return ListUsersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListUsersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListUsersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListUsersResponse payload) { + return payload.getUsersList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListServersRequest, ListServersResponse, ListServersPagedResponse> + LIST_SERVERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServersRequest, ListServersResponse, ListServersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SERVERS_PAGE_STR_DESC, request, context); + return ListServersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListUsersRequest, ListUsersResponse, ListUsersPagedResponse> + LIST_USERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListUsersRequest, ListUsersResponse, ListUsersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListUsersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_USERS_PAGE_STR_DESC, request, context); + return ListUsersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listServers. */ + public PagedCallSettings + listServersSettings() { + return listServersSettings; + } + + /** Returns the object with the settings used for calls to getServer. */ + public UnaryCallSettings getServerSettings() { + return getServerSettings; + } + + /** Returns the object with the settings used for calls to createServer. */ + public UnaryCallSettings createServerSettings() { + return createServerSettings; + } + + /** Returns the object with the settings used for calls to createServer. */ + public OperationCallSettings + createServerOperationSettings() { + return createServerOperationSettings; + } + + /** Returns the object with the settings used for calls to updateServer. */ + public UnaryCallSettings updateServerSettings() { + return updateServerSettings; + } + + /** Returns the object with the settings used for calls to updateServer. */ + public OperationCallSettings + updateServerOperationSettings() { + return updateServerOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteServer. */ + public UnaryCallSettings deleteServerSettings() { + return deleteServerSettings; + } + + /** Returns the object with the settings used for calls to deleteServer. */ + public OperationCallSettings + deleteServerOperationSettings() { + return deleteServerOperationSettings; + } + + /** Returns the object with the settings used for calls to listUsers. */ + public PagedCallSettings + listUsersSettings() { + return listUsersSettings; + } + + /** Returns the object with the settings used for calls to getUser. */ + public UnaryCallSettings getUserSettings() { + return getUserSettings; + } + + /** Returns the object with the settings used for calls to createUser. */ + public UnaryCallSettings createUserSettings() { + return createUserSettings; + } + + /** Returns the object with the settings used for calls to createUser. */ + public OperationCallSettings + createUserOperationSettings() { + return createUserOperationSettings; + } + + /** Returns the object with the settings used for calls to updateUser. */ + public UnaryCallSettings updateUserSettings() { + return updateUserSettings; + } + + /** Returns the object with the settings used for calls to updateUser. */ + public OperationCallSettings + updateUserOperationSettings() { + return updateUserOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteUser. */ + public UnaryCallSettings deleteUserSettings() { + return deleteUserSettings; + } + + /** Returns the object with the settings used for calls to deleteUser. */ + public OperationCallSettings + deleteUserOperationSettings() { + return deleteUserOperationSettings; + } + + /** Returns the object with the settings used for calls to startServer. */ + public UnaryCallSettings startServerSettings() { + return startServerSettings; + } + + /** Returns the object with the settings used for calls to startServer. */ + public OperationCallSettings + startServerOperationSettings() { + return startServerOperationSettings; + } + + /** Returns the object with the settings used for calls to stopServer. */ + public UnaryCallSettings stopServerSettings() { + return stopServerSettings; + } + + /** Returns the object with the settings used for calls to stopServer. */ + public OperationCallSettings + stopServerOperationSettings() { + return stopServerOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public CloudFtpStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonCloudFtpStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "ftp"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "ftp.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "ftp.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultHttpJsonTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(CloudFtpStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CloudFtpStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listServersSettings = settingsBuilder.listServersSettings().build(); + getServerSettings = settingsBuilder.getServerSettings().build(); + createServerSettings = settingsBuilder.createServerSettings().build(); + createServerOperationSettings = settingsBuilder.createServerOperationSettings().build(); + updateServerSettings = settingsBuilder.updateServerSettings().build(); + updateServerOperationSettings = settingsBuilder.updateServerOperationSettings().build(); + deleteServerSettings = settingsBuilder.deleteServerSettings().build(); + deleteServerOperationSettings = settingsBuilder.deleteServerOperationSettings().build(); + listUsersSettings = settingsBuilder.listUsersSettings().build(); + getUserSettings = settingsBuilder.getUserSettings().build(); + createUserSettings = settingsBuilder.createUserSettings().build(); + createUserOperationSettings = settingsBuilder.createUserOperationSettings().build(); + updateUserSettings = settingsBuilder.updateUserSettings().build(); + updateUserOperationSettings = settingsBuilder.updateUserOperationSettings().build(); + deleteUserSettings = settingsBuilder.deleteUserSettings().build(); + deleteUserOperationSettings = settingsBuilder.deleteUserOperationSettings().build(); + startServerSettings = settingsBuilder.startServerSettings().build(); + startServerOperationSettings = settingsBuilder.startServerOperationSettings().build(); + stopServerSettings = settingsBuilder.stopServerSettings().build(); + stopServerOperationSettings = settingsBuilder.stopServerOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-ftp") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for CloudFtpStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListServersRequest, ListServersResponse, ListServersPagedResponse> + listServersSettings; + private final UnaryCallSettings.Builder getServerSettings; + private final UnaryCallSettings.Builder createServerSettings; + private final OperationCallSettings.Builder + createServerOperationSettings; + private final UnaryCallSettings.Builder updateServerSettings; + private final OperationCallSettings.Builder + updateServerOperationSettings; + private final UnaryCallSettings.Builder deleteServerSettings; + private final OperationCallSettings.Builder + deleteServerOperationSettings; + private final PagedCallSettings.Builder< + ListUsersRequest, ListUsersResponse, ListUsersPagedResponse> + listUsersSettings; + private final UnaryCallSettings.Builder getUserSettings; + private final UnaryCallSettings.Builder createUserSettings; + private final OperationCallSettings.Builder + createUserOperationSettings; + private final UnaryCallSettings.Builder updateUserSettings; + private final OperationCallSettings.Builder + updateUserOperationSettings; + private final UnaryCallSettings.Builder deleteUserSettings; + private final OperationCallSettings.Builder + deleteUserOperationSettings; + private final UnaryCallSettings.Builder startServerSettings; + private final OperationCallSettings.Builder + startServerOperationSettings; + private final UnaryCallSettings.Builder stopServerSettings; + private final OperationCallSettings.Builder + stopServerOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(clientContext); + + listServersSettings = PagedCallSettings.newBuilder(LIST_SERVERS_PAGE_STR_FACT); + getServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServerOperationSettings = OperationCallSettings.newBuilder(); + updateServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateServerOperationSettings = OperationCallSettings.newBuilder(); + deleteServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteServerOperationSettings = OperationCallSettings.newBuilder(); + listUsersSettings = PagedCallSettings.newBuilder(LIST_USERS_PAGE_STR_FACT); + getUserSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createUserSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createUserOperationSettings = OperationCallSettings.newBuilder(); + updateUserSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateUserOperationSettings = OperationCallSettings.newBuilder(); + deleteUserSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteUserOperationSettings = OperationCallSettings.newBuilder(); + startServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startServerOperationSettings = OperationCallSettings.newBuilder(); + stopServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopServerOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServersSettings, + getServerSettings, + createServerSettings, + updateServerSettings, + deleteServerSettings, + listUsersSettings, + getUserSettings, + createUserSettings, + updateUserSettings, + deleteUserSettings, + startServerSettings, + stopServerSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(CloudFtpStubSettings settings) { + super(settings); + + listServersSettings = settings.listServersSettings.toBuilder(); + getServerSettings = settings.getServerSettings.toBuilder(); + createServerSettings = settings.createServerSettings.toBuilder(); + createServerOperationSettings = settings.createServerOperationSettings.toBuilder(); + updateServerSettings = settings.updateServerSettings.toBuilder(); + updateServerOperationSettings = settings.updateServerOperationSettings.toBuilder(); + deleteServerSettings = settings.deleteServerSettings.toBuilder(); + deleteServerOperationSettings = settings.deleteServerOperationSettings.toBuilder(); + listUsersSettings = settings.listUsersSettings.toBuilder(); + getUserSettings = settings.getUserSettings.toBuilder(); + createUserSettings = settings.createUserSettings.toBuilder(); + createUserOperationSettings = settings.createUserOperationSettings.toBuilder(); + updateUserSettings = settings.updateUserSettings.toBuilder(); + updateUserOperationSettings = settings.updateUserOperationSettings.toBuilder(); + deleteUserSettings = settings.deleteUserSettings.toBuilder(); + deleteUserOperationSettings = settings.deleteUserOperationSettings.toBuilder(); + startServerSettings = settings.startServerSettings.toBuilder(); + startServerOperationSettings = settings.startServerOperationSettings.toBuilder(); + stopServerSettings = settings.stopServerSettings.toBuilder(); + stopServerOperationSettings = settings.stopServerOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServersSettings, + getServerSettings, + createServerSettings, + updateServerSettings, + deleteServerSettings, + listUsersSettings, + getUserSettings, + createUserSettings, + updateUserSettings, + deleteUserSettings, + startServerSettings, + stopServerSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listServersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listUsersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getUserSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createUserSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateUserSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteUserSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .startServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .stopServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createServerOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Server.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateServerOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Server.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteServerOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createUserOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(User.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateUserOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(User.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteUserOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .startServerOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Server.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .stopServerOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Server.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listServers. */ + public PagedCallSettings.Builder< + ListServersRequest, ListServersResponse, ListServersPagedResponse> + listServersSettings() { + return listServersSettings; + } + + /** Returns the builder for the settings used for calls to getServer. */ + public UnaryCallSettings.Builder getServerSettings() { + return getServerSettings; + } + + /** Returns the builder for the settings used for calls to createServer. */ + public UnaryCallSettings.Builder createServerSettings() { + return createServerSettings; + } + + /** Returns the builder for the settings used for calls to createServer. */ + public OperationCallSettings.Builder + createServerOperationSettings() { + return createServerOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateServer. */ + public UnaryCallSettings.Builder updateServerSettings() { + return updateServerSettings; + } + + /** Returns the builder for the settings used for calls to updateServer. */ + public OperationCallSettings.Builder + updateServerOperationSettings() { + return updateServerOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteServer. */ + public UnaryCallSettings.Builder deleteServerSettings() { + return deleteServerSettings; + } + + /** Returns the builder for the settings used for calls to deleteServer. */ + public OperationCallSettings.Builder + deleteServerOperationSettings() { + return deleteServerOperationSettings; + } + + /** Returns the builder for the settings used for calls to listUsers. */ + public PagedCallSettings.Builder + listUsersSettings() { + return listUsersSettings; + } + + /** Returns the builder for the settings used for calls to getUser. */ + public UnaryCallSettings.Builder getUserSettings() { + return getUserSettings; + } + + /** Returns the builder for the settings used for calls to createUser. */ + public UnaryCallSettings.Builder createUserSettings() { + return createUserSettings; + } + + /** Returns the builder for the settings used for calls to createUser. */ + public OperationCallSettings.Builder + createUserOperationSettings() { + return createUserOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateUser. */ + public UnaryCallSettings.Builder updateUserSettings() { + return updateUserSettings; + } + + /** Returns the builder for the settings used for calls to updateUser. */ + public OperationCallSettings.Builder + updateUserOperationSettings() { + return updateUserOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteUser. */ + public UnaryCallSettings.Builder deleteUserSettings() { + return deleteUserSettings; + } + + /** Returns the builder for the settings used for calls to deleteUser. */ + public OperationCallSettings.Builder + deleteUserOperationSettings() { + return deleteUserOperationSettings; + } + + /** Returns the builder for the settings used for calls to startServer. */ + public UnaryCallSettings.Builder startServerSettings() { + return startServerSettings; + } + + /** Returns the builder for the settings used for calls to startServer. */ + public OperationCallSettings.Builder + startServerOperationSettings() { + return startServerOperationSettings; + } + + /** Returns the builder for the settings used for calls to stopServer. */ + public UnaryCallSettings.Builder stopServerSettings() { + return stopServerSettings; + } + + /** Returns the builder for the settings used for calls to stopServer. */ + public OperationCallSettings.Builder + stopServerOperationSettings() { + return stopServerOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public CloudFtpStubSettings build() throws IOException { + return new CloudFtpStubSettings(this); + } + } +} diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/HttpJsonCloudFtpCallableFactory.java b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/HttpJsonCloudFtpCallableFactory.java new file mode 100644 index 000000000000..b5a3a87b4151 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/HttpJsonCloudFtpCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the CloudFtp service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class HttpJsonCloudFtpCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/HttpJsonCloudFtpStub.java b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/HttpJsonCloudFtpStub.java new file mode 100644 index 000000000000..4b49397121ae --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/HttpJsonCloudFtpStub.java @@ -0,0 +1,1193 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.stub; + +import static com.google.cloud.ftp.v1.CloudFtpClient.ListLocationsPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListServersPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListUsersPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.ftp.v1.CreateServerRequest; +import com.google.cloud.ftp.v1.CreateUserRequest; +import com.google.cloud.ftp.v1.DeleteServerRequest; +import com.google.cloud.ftp.v1.DeleteUserRequest; +import com.google.cloud.ftp.v1.GetServerRequest; +import com.google.cloud.ftp.v1.GetUserRequest; +import com.google.cloud.ftp.v1.ListServersRequest; +import com.google.cloud.ftp.v1.ListServersResponse; +import com.google.cloud.ftp.v1.ListUsersRequest; +import com.google.cloud.ftp.v1.ListUsersResponse; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.StartServerRequest; +import com.google.cloud.ftp.v1.StopServerRequest; +import com.google.cloud.ftp.v1.UpdateServerRequest; +import com.google.cloud.ftp.v1.UpdateUserRequest; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the CloudFtp service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class HttpJsonCloudFtpStub extends CloudFtpStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(User.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Server.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listServersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/ListServers") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/servers", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListServersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/GetServer") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/servers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Server.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/CreateServer") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/servers", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "serverId", request.getServerId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("server", request.getServer(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateServerRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/UpdateServer") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{server.name=projects/*/locations/*/servers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "server.name", request.getServer().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("server", request.getServer(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateServerRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/DeleteServer") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/servers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteServerRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listUsersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/ListUsers") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/servers/*}/users", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListUsersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getUserMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/GetUser") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/servers/*/users/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(User.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createUserMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/CreateUser") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/servers/*}/users", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "userId", request.getUserId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("user", request.getUser(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateUserRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateUserMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/UpdateUser") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{user.name=projects/*/locations/*/servers/*/users/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "user.name", request.getUser().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("user", request.getUser(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateUserRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteUserMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/DeleteUser") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/servers/*/users/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteUserRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + startServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/StartServer") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/servers/*}:start", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (StartServerRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + stopServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.ftp.v1.CloudFtp/StopServer") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/servers/*}:stop", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (StopServerRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listServersCallable; + private final UnaryCallable + listServersPagedCallable; + private final UnaryCallable getServerCallable; + private final UnaryCallable createServerCallable; + private final OperationCallable + createServerOperationCallable; + private final UnaryCallable updateServerCallable; + private final OperationCallable + updateServerOperationCallable; + private final UnaryCallable deleteServerCallable; + private final OperationCallable + deleteServerOperationCallable; + private final UnaryCallable listUsersCallable; + private final UnaryCallable listUsersPagedCallable; + private final UnaryCallable getUserCallable; + private final UnaryCallable createUserCallable; + private final OperationCallable + createUserOperationCallable; + private final UnaryCallable updateUserCallable; + private final OperationCallable + updateUserOperationCallable; + private final UnaryCallable deleteUserCallable; + private final OperationCallable + deleteUserOperationCallable; + private final UnaryCallable startServerCallable; + private final OperationCallable + startServerOperationCallable; + private final UnaryCallable stopServerCallable; + private final OperationCallable + stopServerOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonCloudFtpStub create(CloudFtpStubSettings settings) + throws IOException { + return new HttpJsonCloudFtpStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonCloudFtpStub create(ClientContext clientContext) throws IOException { + return new HttpJsonCloudFtpStub(CloudFtpStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonCloudFtpStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonCloudFtpStub( + CloudFtpStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonCloudFtpStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonCloudFtpStub(CloudFtpStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonCloudFtpCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonCloudFtpStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonCloudFtpStub( + CloudFtpStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listServersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listServersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("server.name", String.valueOf(request.getServer().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings listUsersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listUsersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getUserTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getUserMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createUserTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createUserMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateUserTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateUserMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("user.name", String.valueOf(request.getUser().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteUserTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteUserMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings startServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(startServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings stopServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(stopServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listServersCallable = + callableFactory.createUnaryCallable( + listServersTransportSettings, settings.listServersSettings(), clientContext); + this.listServersPagedCallable = + callableFactory.createPagedCallable( + listServersTransportSettings, settings.listServersSettings(), clientContext); + this.getServerCallable = + callableFactory.createUnaryCallable( + getServerTransportSettings, settings.getServerSettings(), clientContext); + this.createServerCallable = + callableFactory.createUnaryCallable( + createServerTransportSettings, settings.createServerSettings(), clientContext); + this.createServerOperationCallable = + callableFactory.createOperationCallable( + createServerTransportSettings, + settings.createServerOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateServerCallable = + callableFactory.createUnaryCallable( + updateServerTransportSettings, settings.updateServerSettings(), clientContext); + this.updateServerOperationCallable = + callableFactory.createOperationCallable( + updateServerTransportSettings, + settings.updateServerOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteServerCallable = + callableFactory.createUnaryCallable( + deleteServerTransportSettings, settings.deleteServerSettings(), clientContext); + this.deleteServerOperationCallable = + callableFactory.createOperationCallable( + deleteServerTransportSettings, + settings.deleteServerOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listUsersCallable = + callableFactory.createUnaryCallable( + listUsersTransportSettings, settings.listUsersSettings(), clientContext); + this.listUsersPagedCallable = + callableFactory.createPagedCallable( + listUsersTransportSettings, settings.listUsersSettings(), clientContext); + this.getUserCallable = + callableFactory.createUnaryCallable( + getUserTransportSettings, settings.getUserSettings(), clientContext); + this.createUserCallable = + callableFactory.createUnaryCallable( + createUserTransportSettings, settings.createUserSettings(), clientContext); + this.createUserOperationCallable = + callableFactory.createOperationCallable( + createUserTransportSettings, + settings.createUserOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateUserCallable = + callableFactory.createUnaryCallable( + updateUserTransportSettings, settings.updateUserSettings(), clientContext); + this.updateUserOperationCallable = + callableFactory.createOperationCallable( + updateUserTransportSettings, + settings.updateUserOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteUserCallable = + callableFactory.createUnaryCallable( + deleteUserTransportSettings, settings.deleteUserSettings(), clientContext); + this.deleteUserOperationCallable = + callableFactory.createOperationCallable( + deleteUserTransportSettings, + settings.deleteUserOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.startServerCallable = + callableFactory.createUnaryCallable( + startServerTransportSettings, settings.startServerSettings(), clientContext); + this.startServerOperationCallable = + callableFactory.createOperationCallable( + startServerTransportSettings, + settings.startServerOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.stopServerCallable = + callableFactory.createUnaryCallable( + stopServerTransportSettings, settings.stopServerSettings(), clientContext); + this.stopServerOperationCallable = + callableFactory.createOperationCallable( + stopServerTransportSettings, + settings.stopServerOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listServersMethodDescriptor); + methodDescriptors.add(getServerMethodDescriptor); + methodDescriptors.add(createServerMethodDescriptor); + methodDescriptors.add(updateServerMethodDescriptor); + methodDescriptors.add(deleteServerMethodDescriptor); + methodDescriptors.add(listUsersMethodDescriptor); + methodDescriptors.add(getUserMethodDescriptor); + methodDescriptors.add(createUserMethodDescriptor); + methodDescriptors.add(updateUserMethodDescriptor); + methodDescriptors.add(deleteUserMethodDescriptor); + methodDescriptors.add(startServerMethodDescriptor); + methodDescriptors.add(stopServerMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listServersCallable() { + return listServersCallable; + } + + @Override + public UnaryCallable listServersPagedCallable() { + return listServersPagedCallable; + } + + @Override + public UnaryCallable getServerCallable() { + return getServerCallable; + } + + @Override + public UnaryCallable createServerCallable() { + return createServerCallable; + } + + @Override + public OperationCallable + createServerOperationCallable() { + return createServerOperationCallable; + } + + @Override + public UnaryCallable updateServerCallable() { + return updateServerCallable; + } + + @Override + public OperationCallable + updateServerOperationCallable() { + return updateServerOperationCallable; + } + + @Override + public UnaryCallable deleteServerCallable() { + return deleteServerCallable; + } + + @Override + public OperationCallable + deleteServerOperationCallable() { + return deleteServerOperationCallable; + } + + @Override + public UnaryCallable listUsersCallable() { + return listUsersCallable; + } + + @Override + public UnaryCallable listUsersPagedCallable() { + return listUsersPagedCallable; + } + + @Override + public UnaryCallable getUserCallable() { + return getUserCallable; + } + + @Override + public UnaryCallable createUserCallable() { + return createUserCallable; + } + + @Override + public OperationCallable + createUserOperationCallable() { + return createUserOperationCallable; + } + + @Override + public UnaryCallable updateUserCallable() { + return updateUserCallable; + } + + @Override + public OperationCallable + updateUserOperationCallable() { + return updateUserOperationCallable; + } + + @Override + public UnaryCallable deleteUserCallable() { + return deleteUserCallable; + } + + @Override + public OperationCallable + deleteUserOperationCallable() { + return deleteUserOperationCallable; + } + + @Override + public UnaryCallable startServerCallable() { + return startServerCallable; + } + + @Override + public OperationCallable + startServerOperationCallable() { + return startServerOperationCallable; + } + + @Override + public UnaryCallable stopServerCallable() { + return stopServerCallable; + } + + @Override + public OperationCallable + stopServerOperationCallable() { + return stopServerOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/Version.java b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/Version.java new file mode 100644 index 000000000000..eb1b97a33d93 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/java/com/google/cloud/ftp/v1/stub/Version.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-ftp:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-ftp/google-cloud-ftp/src/main/resources/META-INF/native-image/com.google.cloud.ftp.v1/reflect-config.json b/java-ftp/google-cloud-ftp/src/main/resources/META-INF/native-image/com.google.cloud.ftp.v1/reflect-config.json new file mode 100644 index 000000000000..666b7d2b1fb5 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/main/resources/META-INF/native-image/com.google.cloud.ftp.v1/reflect-config.json @@ -0,0 +1,2153 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.CreateServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.CreateServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.CreateUserRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.CreateUserRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.DeleteServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.DeleteServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.DeleteUserRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.DeleteUserRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ExternalServerConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ExternalServerConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.GetServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.GetServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.GetUserRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.GetUserRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.InternalServerConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.InternalServerConfig$AllowedConsumer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.InternalServerConfig$AllowedConsumer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.InternalServerConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.InternalServerConfig$DeniedConsumer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.InternalServerConfig$DeniedConsumer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.InternalServerConfig$PscEndpoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.InternalServerConfig$PscEndpoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ListServersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ListServersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ListServersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ListServersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ListUsersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ListUsersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ListUsersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ListUsersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.Server", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.Server$AccessType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.Server$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.Server$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ServerCredential", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ServerCredential$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.ServerView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.StartServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.StartServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.StopServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.StopServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.StorageDirectoryMapping", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.StorageDirectoryMapping$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.StorageDirectoryMapping$Permission", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.UpdateServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.UpdateServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.UpdateUserRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.UpdateUserRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.User", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.User$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.User$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.UserCredential", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.UserCredential$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.UserCredential$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.ftp.v1.UserView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-ftp/google-cloud-ftp/src/test/java/com/google/cloud/ftp/v1/CloudFtpClientTest.java b/java-ftp/google-cloud-ftp/src/test/java/com/google/cloud/ftp/v1/CloudFtpClientTest.java new file mode 100644 index 000000000000..58325d2100d2 --- /dev/null +++ b/java-ftp/google-cloud-ftp/src/test/java/com/google/cloud/ftp/v1/CloudFtpClientTest.java @@ -0,0 +1,1403 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1; + +import static com.google.cloud.ftp.v1.CloudFtpClient.ListLocationsPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListServersPagedResponse; +import static com.google.cloud.ftp.v1.CloudFtpClient.ListUsersPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.ftp.v1.stub.HttpJsonCloudFtpStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CloudFtpClientTest { + private static MockHttpService mockService; + private static CloudFtpClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonCloudFtpStub.getMethodDescriptors(), CloudFtpSettings.getDefaultEndpoint()); + CloudFtpSettings settings = + CloudFtpSettings.newBuilder() + .setTransportChannelProvider( + CloudFtpSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudFtpClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listServersTest() throws Exception { + Server responsesElement = Server.newBuilder().build(); + ListServersResponse expectedResponse = + ListServersResponse.newBuilder() + .setNextPageToken("") + .addAllServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListServersPagedResponse pagedListResponse = client.listServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listServersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listServersTest2() throws Exception { + Server responsesElement = Server.newBuilder().build(); + ListServersResponse expectedResponse = + ListServersResponse.newBuilder() + .setNextPageToken("") + .addAllServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListServersPagedResponse pagedListResponse = client.listServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listServersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServerTest() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + mockService.addResponse(expectedResponse); + + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + + Server actualResponse = client.getServer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + client.getServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServerTest2() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-790/locations/location-790/servers/server-790"; + + Server actualResponse = client.getServer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getServerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-790/locations/location-790/servers/server-790"; + client.getServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServerTest() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Server server = Server.newBuilder().build(); + String serverId = "serverId1379103678"; + + Server actualResponse = client.createServerAsync(parent, server, serverId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Server server = Server.newBuilder().build(); + String serverId = "serverId1379103678"; + client.createServerAsync(parent, server, serverId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createServerTest2() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Server server = Server.newBuilder().build(); + String serverId = "serverId1379103678"; + + Server actualResponse = client.createServerAsync(parent, server, serverId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Server server = Server.newBuilder().build(); + String serverId = "serverId1379103678"; + client.createServerAsync(parent, server, serverId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateServerTest() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Server server = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Server actualResponse = client.updateServerAsync(server, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Server server = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateServerAsync(server, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServerTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + + client.deleteServerAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + client.deleteServerAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteServerTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-790/locations/location-790/servers/server-790"; + + client.deleteServerAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-790/locations/location-790/servers/server-790"; + client.deleteServerAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listUsersTest() throws Exception { + User responsesElement = User.newBuilder().build(); + ListUsersResponse expectedResponse = + ListUsersResponse.newBuilder() + .setNextPageToken("") + .addAllUsers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ServerName parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + + ListUsersPagedResponse pagedListResponse = client.listUsers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUsersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServerName parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + client.listUsers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUsersTest2() throws Exception { + User responsesElement = User.newBuilder().build(); + ListUsersResponse expectedResponse = + ListUsersResponse.newBuilder() + .setNextPageToken("") + .addAllUsers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-4581/locations/location-4581/servers/server-4581"; + + ListUsersPagedResponse pagedListResponse = client.listUsers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUsersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4581/locations/location-4581/servers/server-4581"; + client.listUsers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserTest() throws Exception { + User expectedResponse = + User.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setUsername("username-265713450") + .setCustomerServiceAccount("customerServiceAccount-1594456778") + .addAllUserCredentials(new ArrayList()) + .addAllStorageDirectoryMappings(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]"); + + User actualResponse = client.getUser(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]"); + client.getUser(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserTest2() throws Exception { + User expectedResponse = + User.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setUsername("username-265713450") + .setCustomerServiceAccount("customerServiceAccount-1594456778") + .addAllUserCredentials(new ArrayList()) + .addAllStorageDirectoryMappings(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7830/locations/location-7830/servers/server-7830/users/user-7830"; + + User actualResponse = client.getUser(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7830/locations/location-7830/servers/server-7830/users/user-7830"; + client.getUser(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserTest() throws Exception { + User expectedResponse = + User.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setUsername("username-265713450") + .setCustomerServiceAccount("customerServiceAccount-1594456778") + .addAllUserCredentials(new ArrayList()) + .addAllStorageDirectoryMappings(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServerName parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + User user = User.newBuilder().build(); + String userId = "userId-836030906"; + + User actualResponse = client.createUserAsync(parent, user, userId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createUserExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServerName parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + User user = User.newBuilder().build(); + String userId = "userId-836030906"; + client.createUserAsync(parent, user, userId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createUserTest2() throws Exception { + User expectedResponse = + User.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setUsername("username-265713450") + .setCustomerServiceAccount("customerServiceAccount-1594456778") + .addAllUserCredentials(new ArrayList()) + .addAllStorageDirectoryMappings(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-4581/locations/location-4581/servers/server-4581"; + User user = User.newBuilder().build(); + String userId = "userId-836030906"; + + User actualResponse = client.createUserAsync(parent, user, userId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createUserExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4581/locations/location-4581/servers/server-4581"; + User user = User.newBuilder().build(); + String userId = "userId-836030906"; + client.createUserAsync(parent, user, userId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateUserTest() throws Exception { + User expectedResponse = + User.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setUsername("username-265713450") + .setCustomerServiceAccount("customerServiceAccount-1594456778") + .addAllUserCredentials(new ArrayList()) + .addAllStorageDirectoryMappings(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + User user = + User.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setUsername("username-265713450") + .setCustomerServiceAccount("customerServiceAccount-1594456778") + .addAllUserCredentials(new ArrayList()) + .addAllStorageDirectoryMappings(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + User actualResponse = client.updateUserAsync(user, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateUserExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + User user = + User.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setUsername("username-265713450") + .setCustomerServiceAccount("customerServiceAccount-1594456778") + .addAllUserCredentials(new ArrayList()) + .addAllStorageDirectoryMappings(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateUserAsync(user, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteUserTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]"); + + client.deleteUserAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteUserExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]"); + client.deleteUserAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteUserTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-7830/locations/location-7830/servers/server-7830/users/user-7830"; + + client.deleteUserAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteUserExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7830/locations/location-7830/servers/server-7830/users/user-7830"; + client.deleteUserAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void startServerTest() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + + Server actualResponse = client.startServerAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void startServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + client.startServerAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void startServerTest2() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-790/locations/location-790/servers/server-790"; + + Server actualResponse = client.startServerAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void startServerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-790/locations/location-790/servers/server-790"; + client.startServerAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void stopServerTest() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + + Server actualResponse = client.stopServerAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void stopServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + client.stopServerAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void stopServerTest2() throws Exception { + Server expectedResponse = + Server.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setGoogleManagedServerCredential(ServerCredential.newBuilder().build()) + .setServiceAgent("serviceAgent331969872") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-790/locations/location-790/servers/server-790"; + + Server actualResponse = client.stopServerAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void stopServerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-790/locations/location-790/servers/server-790"; + client.stopServerAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-ftp/pom.xml b/java-ftp/pom.xml new file mode 100644 index 000000000000..faea30571ba4 --- /dev/null +++ b/java-ftp/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + com.google.cloud + google-cloud-ftp-parent + pom + 0.1.0-SNAPSHOT + Google Cloud FTP Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.90.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-ftp-parent + + + + + + + com.google.cloud + google-cloud-ftp + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-ftp-v1 + 0.1.0-SNAPSHOT + + + + + + + + google-cloud-ftp + proto-google-cloud-ftp-v1 + + google-cloud-ftp-bom + + + \ No newline at end of file diff --git a/java-ftp/proto-google-cloud-ftp-v1/clirr-ignored-differences.xml b/java-ftp/proto-google-cloud-ftp-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..6921747316c4 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/ftp/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/ftp/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/ftp/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/ftp/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/ftp/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/ftp/v1/** + * clear() + ** + + + 7006 + com/google/cloud/ftp/v1/** + * clearField(*) + ** + + + 7006 + com/google/cloud/ftp/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/ftp/v1/** + * clone() + ** + + + 7006 + com/google/cloud/ftp/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/ftp/v1/** + * setField(*) + ** + + + 7006 + com/google/cloud/ftp/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/ftp/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-ftp/proto-google-cloud-ftp-v1/pom.xml b/java-ftp/proto-google-cloud-ftp-v1/pom.xml new file mode 100644 index 000000000000..ae98a6b51381 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/pom.xml @@ -0,0 +1,41 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-ftp-v1 + 0.1.0-SNAPSHOT + proto-google-cloud-ftp-v1 + Proto library for google-cloud-ftp + + com.google.cloud + google-cloud-ftp-parent + 0.1.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + org.jspecify + jspecify + + + diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateServerRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateServerRequest.java new file mode 100644 index 000000000000..c67c221a3a0a --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateServerRequest.java @@ -0,0 +1,1391 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *

+ * Message for creating a Server
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.CreateServerRequest} + */ +@com.google.protobuf.Generated +public final class CreateServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.CreateServerRequest) + CreateServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateServerRequest"); + } + + // Use CreateServerRequest.newBuilder() to construct. + private CreateServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateServerRequest() { + parent_ = ""; + serverId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.CreateServerRequest.class, + com.google.cloud.ftp.v1.CreateServerRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object serverId_ = ""; + + /** + * + * + *
+   * Required. A unique ID for the server. Must start with a lowercase letter,
+   * and end with a lowercase letter or number. Can contain lowercase letters,
+   * numbers, and hyphens. Maximum length is 30 characters.
+   * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serverId. + */ + @java.lang.Override + public java.lang.String getServerId() { + java.lang.Object ref = serverId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A unique ID for the server. Must start with a lowercase letter,
+   * and end with a lowercase letter or number. Can contain lowercase letters,
+   * numbers, and hyphens. Maximum length is 30 characters.
+   * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serverId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServerIdBytes() { + java.lang.Object ref = serverId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serverId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVER_FIELD_NUMBER = 3; + private com.google.cloud.ftp.v1.Server server_; + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the server field is set. + */ + @java.lang.Override + public boolean hasServer() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The server. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.Server getServer() { + return server_ == null ? com.google.cloud.ftp.v1.Server.getDefaultInstance() : server_; + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerOrBuilder getServerOrBuilder() { + return server_ == null ? com.google.cloud.ftp.v1.Server.getDefaultInstance() : server_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, serverId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getServer()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, serverId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getServer()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.CreateServerRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.CreateServerRequest other = + (com.google.cloud.ftp.v1.CreateServerRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getServerId().equals(other.getServerId())) return false; + if (hasServer() != other.hasServer()) return false; + if (hasServer()) { + if (!getServer().equals(other.getServer())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SERVER_ID_FIELD_NUMBER; + hash = (53 * hash) + getServerId().hashCode(); + if (hasServer()) { + hash = (37 * hash) + SERVER_FIELD_NUMBER; + hash = (53 * hash) + getServer().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.CreateServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for creating a Server
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.CreateServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.CreateServerRequest) + com.google.cloud.ftp.v1.CreateServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.CreateServerRequest.class, + com.google.cloud.ftp.v1.CreateServerRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.CreateServerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetServerFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + serverId_ = ""; + server_ = null; + if (serverBuilder_ != null) { + serverBuilder_.dispose(); + serverBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.CreateServerRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.CreateServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.CreateServerRequest build() { + com.google.cloud.ftp.v1.CreateServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.CreateServerRequest buildPartial() { + com.google.cloud.ftp.v1.CreateServerRequest result = + new com.google.cloud.ftp.v1.CreateServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.CreateServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serverId_ = serverId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.server_ = serverBuilder_ == null ? server_ : serverBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.CreateServerRequest) { + return mergeFrom((com.google.cloud.ftp.v1.CreateServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.CreateServerRequest other) { + if (other == com.google.cloud.ftp.v1.CreateServerRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getServerId().isEmpty()) { + serverId_ = other.serverId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasServer()) { + mergeServer(other.getServer()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + serverId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetServerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object serverId_ = ""; + + /** + * + * + *
+     * Required. A unique ID for the server. Must start with a lowercase letter,
+     * and end with a lowercase letter or number. Can contain lowercase letters,
+     * numbers, and hyphens. Maximum length is 30 characters.
+     * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serverId. + */ + public java.lang.String getServerId() { + java.lang.Object ref = serverId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A unique ID for the server. Must start with a lowercase letter,
+     * and end with a lowercase letter or number. Can contain lowercase letters,
+     * numbers, and hyphens. Maximum length is 30 characters.
+     * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serverId. + */ + public com.google.protobuf.ByteString getServerIdBytes() { + java.lang.Object ref = serverId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serverId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A unique ID for the server. Must start with a lowercase letter,
+     * and end with a lowercase letter or number. Can contain lowercase letters,
+     * numbers, and hyphens. Maximum length is 30 characters.
+     * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serverId to set. + * @return This builder for chaining. + */ + public Builder setServerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serverId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A unique ID for the server. Must start with a lowercase letter,
+     * and end with a lowercase letter or number. Can contain lowercase letters,
+     * numbers, and hyphens. Maximum length is 30 characters.
+     * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServerId() { + serverId_ = getDefaultInstance().getServerId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A unique ID for the server. Must start with a lowercase letter,
+     * and end with a lowercase letter or number. Can contain lowercase letters,
+     * numbers, and hyphens. Maximum length is 30 characters.
+     * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serverId to set. + * @return This builder for chaining. + */ + public Builder setServerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serverId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.ftp.v1.Server server_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder> + serverBuilder_; + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the server field is set. + */ + public boolean hasServer() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The server. + */ + public com.google.cloud.ftp.v1.Server getServer() { + if (serverBuilder_ == null) { + return server_ == null ? com.google.cloud.ftp.v1.Server.getDefaultInstance() : server_; + } else { + return serverBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setServer(com.google.cloud.ftp.v1.Server value) { + if (serverBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + server_ = value; + } else { + serverBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setServer(com.google.cloud.ftp.v1.Server.Builder builderForValue) { + if (serverBuilder_ == null) { + server_ = builderForValue.build(); + } else { + serverBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeServer(com.google.cloud.ftp.v1.Server value) { + if (serverBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && server_ != null + && server_ != com.google.cloud.ftp.v1.Server.getDefaultInstance()) { + getServerBuilder().mergeFrom(value); + } else { + server_ = value; + } + } else { + serverBuilder_.mergeFrom(value); + } + if (server_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearServer() { + bitField0_ = (bitField0_ & ~0x00000004); + server_ = null; + if (serverBuilder_ != null) { + serverBuilder_.dispose(); + serverBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.Server.Builder getServerBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetServerFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.ServerOrBuilder getServerOrBuilder() { + if (serverBuilder_ != null) { + return serverBuilder_.getMessageOrBuilder(); + } else { + return server_ == null ? com.google.cloud.ftp.v1.Server.getDefaultInstance() : server_; + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder> + internalGetServerFieldBuilder() { + if (serverBuilder_ == null) { + serverBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder>( + getServer(), getParentForChildren(), isClean()); + server_ = null; + } + return serverBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.CreateServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.CreateServerRequest) + private static final com.google.cloud.ftp.v1.CreateServerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.CreateServerRequest(); + } + + public static com.google.cloud.ftp.v1.CreateServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.CreateServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateServerRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateServerRequestOrBuilder.java new file mode 100644 index 000000000000..0a350eecacdb --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateServerRequestOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface CreateServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.CreateServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A unique ID for the server. Must start with a lowercase letter,
+   * and end with a lowercase letter or number. Can contain lowercase letters,
+   * numbers, and hyphens. Maximum length is 30 characters.
+   * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serverId. + */ + java.lang.String getServerId(); + + /** + * + * + *
+   * Required. A unique ID for the server. Must start with a lowercase letter,
+   * and end with a lowercase letter or number. Can contain lowercase letters,
+   * numbers, and hyphens. Maximum length is 30 characters.
+   * 
+ * + * string server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serverId. + */ + com.google.protobuf.ByteString getServerIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the server field is set. + */ + boolean hasServer(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The server. + */ + com.google.cloud.ftp.v1.Server getServer(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.ftp.v1.ServerOrBuilder getServerOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateUserRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateUserRequest.java new file mode 100644 index 000000000000..eac808ef995c --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateUserRequest.java @@ -0,0 +1,1375 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for creating a User
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.CreateUserRequest} + */ +@com.google.protobuf.Generated +public final class CreateUserRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.CreateUserRequest) + CreateUserRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateUserRequest"); + } + + // Use CreateUserRequest.newBuilder() to construct. + private CreateUserRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateUserRequest() { + parent_ = ""; + userId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.CreateUserRequest.class, + com.google.cloud.ftp.v1.CreateUserRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + + /** + * + * + *
+   * Required. A unique user ID for the SFTP user. The user ID must start with a
+   * lowercase letter and can include lowercase letters, numbers, or hyphens.
+   * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A unique user ID for the SFTP user. The user ID must start with a
+   * lowercase letter and can include lowercase letters, numbers, or hyphens.
+   * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 3; + private com.google.cloud.ftp.v1.User user_; + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.User getUser() { + return user_ == null ? com.google.cloud.ftp.v1.User.getDefaultInstance() : user_; + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserOrBuilder getUserOrBuilder() { + return user_ == null ? com.google.cloud.ftp.v1.User.getDefaultInstance() : user_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, userId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getUser()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, userId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUser()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.CreateUserRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.CreateUserRequest other = + (com.google.cloud.ftp.v1.CreateUserRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getUserId().equals(other.getUserId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser().equals(other.getUser())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.CreateUserRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for creating a User
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.CreateUserRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.CreateUserRequest) + com.google.cloud.ftp.v1.CreateUserRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.CreateUserRequest.class, + com.google.cloud.ftp.v1.CreateUserRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.CreateUserRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + userId_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_CreateUserRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.CreateUserRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.CreateUserRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.CreateUserRequest build() { + com.google.cloud.ftp.v1.CreateUserRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.CreateUserRequest buildPartial() { + com.google.cloud.ftp.v1.CreateUserRequest result = + new com.google.cloud.ftp.v1.CreateUserRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.CreateUserRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userId_ = userId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.user_ = userBuilder_ == null ? user_ : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.CreateUserRequest) { + return mergeFrom((com.google.cloud.ftp.v1.CreateUserRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.CreateUserRequest other) { + if (other == com.google.cloud.ftp.v1.CreateUserRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetUserFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object userId_ = ""; + + /** + * + * + *
+     * Required. A unique user ID for the SFTP user. The user ID must start with a
+     * lowercase letter and can include lowercase letters, numbers, or hyphens.
+     * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A unique user ID for the SFTP user. The user ID must start with a
+     * lowercase letter and can include lowercase letters, numbers, or hyphens.
+     * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A unique user ID for the SFTP user. The user ID must start with a
+     * lowercase letter and can include lowercase letters, numbers, or hyphens.
+     * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A unique user ID for the SFTP user. The user ID must start with a
+     * lowercase letter and can include lowercase letters, numbers, or hyphens.
+     * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A unique user ID for the SFTP user. The user ID must start with a
+     * lowercase letter and can include lowercase letters, numbers, or hyphens.
+     * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.ftp.v1.User user_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder> + userBuilder_; + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + public com.google.cloud.ftp.v1.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? com.google.cloud.ftp.v1.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUser(com.google.cloud.ftp.v1.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUser(com.google.cloud.ftp.v1.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUser(com.google.cloud.ftp.v1.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && user_ != null + && user_ != com.google.cloud.ftp.v1.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000004); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.ftp.v1.User.Builder getUserBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUserFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.ftp.v1.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? com.google.cloud.ftp.v1.User.getDefaultInstance() : user_; + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder> + internalGetUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder>( + getUser(), getParentForChildren(), isClean()); + user_ = null; + } + return userBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.CreateUserRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.CreateUserRequest) + private static final com.google.cloud.ftp.v1.CreateUserRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.CreateUserRequest(); + } + + public static com.google.cloud.ftp.v1.CreateUserRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateUserRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.CreateUserRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateUserRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateUserRequestOrBuilder.java new file mode 100644 index 000000000000..5cf0c049489c --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/CreateUserRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface CreateUserRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.CreateUserRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A unique user ID for the SFTP user. The user ID must start with a
+   * lowercase letter and can include lowercase letters, numbers, or hyphens.
+   * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userId. + */ + java.lang.String getUserId(); + + /** + * + * + *
+   * Required. A unique user ID for the SFTP user. The user ID must start with a
+   * lowercase letter and can include lowercase letters, numbers, or hyphens.
+   * 
+ * + * string user_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userId. + */ + com.google.protobuf.ByteString getUserIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the user field is set. + */ + boolean hasUser(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + com.google.cloud.ftp.v1.User getUser(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.ftp.v1.User user = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.ftp.v1.UserOrBuilder getUserOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteServerRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteServerRequest.java new file mode 100644 index 000000000000..177b6db46dc3 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteServerRequest.java @@ -0,0 +1,617 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for deleting a Server
+ * Note: Cascading delete is not supported. Any nested User resources
+ * under this Server must be deleted before the Server itself can be deleted.
+ * Attempting to delete a Server with active User resources will result in an
+ * error.
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.DeleteServerRequest} + */ +@com.google.protobuf.Generated +public final class DeleteServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.DeleteServerRequest) + DeleteServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteServerRequest"); + } + + // Use DeleteServerRequest.newBuilder() to construct. + private DeleteServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteServerRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.DeleteServerRequest.class, + com.google.cloud.ftp.v1.DeleteServerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.DeleteServerRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.DeleteServerRequest other = + (com.google.cloud.ftp.v1.DeleteServerRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.DeleteServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a Server
+   * Note: Cascading delete is not supported. Any nested User resources
+   * under this Server must be deleted before the Server itself can be deleted.
+   * Attempting to delete a Server with active User resources will result in an
+   * error.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.DeleteServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.DeleteServerRequest) + com.google.cloud.ftp.v1.DeleteServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.DeleteServerRequest.class, + com.google.cloud.ftp.v1.DeleteServerRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.DeleteServerRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.DeleteServerRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.DeleteServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.DeleteServerRequest build() { + com.google.cloud.ftp.v1.DeleteServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.DeleteServerRequest buildPartial() { + com.google.cloud.ftp.v1.DeleteServerRequest result = + new com.google.cloud.ftp.v1.DeleteServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.DeleteServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.DeleteServerRequest) { + return mergeFrom((com.google.cloud.ftp.v1.DeleteServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.DeleteServerRequest other) { + if (other == com.google.cloud.ftp.v1.DeleteServerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.DeleteServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.DeleteServerRequest) + private static final com.google.cloud.ftp.v1.DeleteServerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.DeleteServerRequest(); + } + + public static com.google.cloud.ftp.v1.DeleteServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.DeleteServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteServerRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteServerRequestOrBuilder.java new file mode 100644 index 000000000000..643c8a17c6df --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteServerRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface DeleteServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.DeleteServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteUserRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteUserRequest.java new file mode 100644 index 000000000000..f9a228424469 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteUserRequest.java @@ -0,0 +1,706 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for deleting a User
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.DeleteUserRequest} + */ +@com.google.protobuf.Generated +public final class DeleteUserRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.DeleteUserRequest) + DeleteUserRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteUserRequest"); + } + + // Use DeleteUserRequest.newBuilder() to construct. + private DeleteUserRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteUserRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.DeleteUserRequest.class, + com.google.cloud.ftp.v1.DeleteUserRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, the request will force the deletion of the User.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.DeleteUserRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.DeleteUserRequest other = + (com.google.cloud.ftp.v1.DeleteUserRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.DeleteUserRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a User
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.DeleteUserRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.DeleteUserRequest) + com.google.cloud.ftp.v1.DeleteUserRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.DeleteUserRequest.class, + com.google.cloud.ftp.v1.DeleteUserRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.DeleteUserRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_DeleteUserRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.DeleteUserRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.DeleteUserRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.DeleteUserRequest build() { + com.google.cloud.ftp.v1.DeleteUserRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.DeleteUserRequest buildPartial() { + com.google.cloud.ftp.v1.DeleteUserRequest result = + new com.google.cloud.ftp.v1.DeleteUserRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.DeleteUserRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.DeleteUserRequest) { + return mergeFrom((com.google.cloud.ftp.v1.DeleteUserRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.DeleteUserRequest other) { + if (other == com.google.cloud.ftp.v1.DeleteUserRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the User.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the User.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the User.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000002); + force_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.DeleteUserRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.DeleteUserRequest) + private static final com.google.cloud.ftp.v1.DeleteUserRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.DeleteUserRequest(); + } + + public static com.google.cloud.ftp.v1.DeleteUserRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteUserRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.DeleteUserRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteUserRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteUserRequestOrBuilder.java new file mode 100644 index 000000000000..296727f1ecf2 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/DeleteUserRequestOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface DeleteUserRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.DeleteUserRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. If set to true, the request will force the deletion of the User.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ExternalServerConfig.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ExternalServerConfig.java new file mode 100644 index 000000000000..84d75a7a355a --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ExternalServerConfig.java @@ -0,0 +1,1025 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Configuration for external server.
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ExternalServerConfig} + */ +@com.google.protobuf.Generated +public final class ExternalServerConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.ExternalServerConfig) + ExternalServerConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ExternalServerConfig"); + } + + // Use ExternalServerConfig.newBuilder() to construct. + private ExternalServerConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExternalServerConfig() { + ipAddress_ = ""; + allowedCidrBlocks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ExternalServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ExternalServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ExternalServerConfig.class, + com.google.cloud.ftp.v1.ExternalServerConfig.Builder.class); + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + + /** + * + * + *
+   * Output only. IP address of the LB via which clients will connect.
+   * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. IP address of the LB via which clients will connect.
+   * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOWED_CIDR_BLOCKS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedCidrBlocks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. List of CIDR blocks that are allowed to access the Server.
+   * A CIDR range consists of an IP Address and a prefix length to construct the
+   * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+   * address). For now, only IPV4 addresses are supported.
+   * Examples: "203.0.113.0/24" -
+   * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+   * "0.0.0.0/0" - matches against any IP address.
+   * This field must contain at least one entry if the access type is EXTERNAL.
+   * The number of allowed CIDR blocks cannot exceed 500.
+   * Example: 192.168.0.0/16
+   * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getAllowedCidrBlocksList() { + return allowedCidrBlocks_; + } + + /** + * + * + *
+   * Optional. List of CIDR blocks that are allowed to access the Server.
+   * A CIDR range consists of an IP Address and a prefix length to construct the
+   * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+   * address). For now, only IPV4 addresses are supported.
+   * Examples: "203.0.113.0/24" -
+   * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+   * "0.0.0.0/0" - matches against any IP address.
+   * This field must contain at least one entry if the access type is EXTERNAL.
+   * The number of allowed CIDR blocks cannot exceed 500.
+   * Example: 192.168.0.0/16
+   * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedCidrBlocks. + */ + public int getAllowedCidrBlocksCount() { + return allowedCidrBlocks_.size(); + } + + /** + * + * + *
+   * Optional. List of CIDR blocks that are allowed to access the Server.
+   * A CIDR range consists of an IP Address and a prefix length to construct the
+   * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+   * address). For now, only IPV4 addresses are supported.
+   * Examples: "203.0.113.0/24" -
+   * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+   * "0.0.0.0/0" - matches against any IP address.
+   * This field must contain at least one entry if the access type is EXTERNAL.
+   * The number of allowed CIDR blocks cannot exceed 500.
+   * Example: 192.168.0.0/16
+   * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedCidrBlocks at the given index. + */ + public java.lang.String getAllowedCidrBlocks(int index) { + return allowedCidrBlocks_.get(index); + } + + /** + * + * + *
+   * Optional. List of CIDR blocks that are allowed to access the Server.
+   * A CIDR range consists of an IP Address and a prefix length to construct the
+   * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+   * address). For now, only IPV4 addresses are supported.
+   * Examples: "203.0.113.0/24" -
+   * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+   * "0.0.0.0/0" - matches against any IP address.
+   * This field must contain at least one entry if the access type is EXTERNAL.
+   * The number of allowed CIDR blocks cannot exceed 500.
+   * Example: 192.168.0.0/16
+   * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getAllowedCidrBlocksBytes(int index) { + return allowedCidrBlocks_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ipAddress_); + } + for (int i = 0; i < allowedCidrBlocks_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, allowedCidrBlocks_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ipAddress_); + } + { + int dataSize = 0; + for (int i = 0; i < allowedCidrBlocks_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedCidrBlocks_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedCidrBlocksList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.ExternalServerConfig)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.ExternalServerConfig other = + (com.google.cloud.ftp.v1.ExternalServerConfig) obj; + + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getAllowedCidrBlocksList().equals(other.getAllowedCidrBlocksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + if (getAllowedCidrBlocksCount() > 0) { + hash = (37 * hash) + ALLOWED_CIDR_BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedCidrBlocksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.ExternalServerConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Configuration for external server.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ExternalServerConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.ExternalServerConfig) + com.google.cloud.ftp.v1.ExternalServerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ExternalServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ExternalServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ExternalServerConfig.class, + com.google.cloud.ftp.v1.ExternalServerConfig.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.ExternalServerConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ipAddress_ = ""; + allowedCidrBlocks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ExternalServerConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ExternalServerConfig getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ExternalServerConfig build() { + com.google.cloud.ftp.v1.ExternalServerConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ExternalServerConfig buildPartial() { + com.google.cloud.ftp.v1.ExternalServerConfig result = + new com.google.cloud.ftp.v1.ExternalServerConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.ExternalServerConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + allowedCidrBlocks_.makeImmutable(); + result.allowedCidrBlocks_ = allowedCidrBlocks_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.ExternalServerConfig) { + return mergeFrom((com.google.cloud.ftp.v1.ExternalServerConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.ExternalServerConfig other) { + if (other == com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance()) return this; + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.allowedCidrBlocks_.isEmpty()) { + if (allowedCidrBlocks_.isEmpty()) { + allowedCidrBlocks_ = other.allowedCidrBlocks_; + bitField0_ |= 0x00000002; + } else { + ensureAllowedCidrBlocksIsMutable(); + allowedCidrBlocks_.addAll(other.allowedCidrBlocks_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedCidrBlocksIsMutable(); + allowedCidrBlocks_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object ipAddress_ = ""; + + /** + * + * + *
+     * Output only. IP address of the LB via which clients will connect.
+     * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. IP address of the LB via which clients will connect.
+     * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. IP address of the LB via which clients will connect.
+     * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. IP address of the LB via which clients will connect.
+     * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. IP address of the LB via which clients will connect.
+     * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList allowedCidrBlocks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedCidrBlocksIsMutable() { + if (!allowedCidrBlocks_.isModifiable()) { + allowedCidrBlocks_ = new com.google.protobuf.LazyStringArrayList(allowedCidrBlocks_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedCidrBlocks. + */ + public com.google.protobuf.ProtocolStringList getAllowedCidrBlocksList() { + allowedCidrBlocks_.makeImmutable(); + return allowedCidrBlocks_; + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedCidrBlocks. + */ + public int getAllowedCidrBlocksCount() { + return allowedCidrBlocks_.size(); + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedCidrBlocks at the given index. + */ + public java.lang.String getAllowedCidrBlocks(int index) { + return allowedCidrBlocks_.get(index); + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedCidrBlocks at the given index. + */ + public com.google.protobuf.ByteString getAllowedCidrBlocksBytes(int index) { + return allowedCidrBlocks_.getByteString(index); + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedCidrBlocks to set. + * @return This builder for chaining. + */ + public Builder setAllowedCidrBlocks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedCidrBlocksIsMutable(); + allowedCidrBlocks_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addAllowedCidrBlocks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedCidrBlocksIsMutable(); + allowedCidrBlocks_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedCidrBlocks(java.lang.Iterable values) { + ensureAllowedCidrBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedCidrBlocks_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedCidrBlocks() { + allowedCidrBlocks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of CIDR blocks that are allowed to access the Server.
+     * A CIDR range consists of an IP Address and a prefix length to construct the
+     * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+     * address). For now, only IPV4 addresses are supported.
+     * Examples: "203.0.113.0/24" -
+     * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+     * "0.0.0.0/0" - matches against any IP address.
+     * This field must contain at least one entry if the access type is EXTERNAL.
+     * The number of allowed CIDR blocks cannot exceed 500.
+     * Example: 192.168.0.0/16
+     * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedCidrBlocks to add. + * @return This builder for chaining. + */ + public Builder addAllowedCidrBlocksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedCidrBlocksIsMutable(); + allowedCidrBlocks_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.ExternalServerConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.ExternalServerConfig) + private static final com.google.cloud.ftp.v1.ExternalServerConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.ExternalServerConfig(); + } + + public static com.google.cloud.ftp.v1.ExternalServerConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExternalServerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ExternalServerConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ExternalServerConfigOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ExternalServerConfigOrBuilder.java new file mode 100644 index 000000000000..163f737c26ac --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ExternalServerConfigOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface ExternalServerConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.ExternalServerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. IP address of the LB via which clients will connect.
+   * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + + /** + * + * + *
+   * Output only. IP address of the LB via which clients will connect.
+   * 
+ * + * + * string ip_address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * Optional. List of CIDR blocks that are allowed to access the Server.
+   * A CIDR range consists of an IP Address and a prefix length to construct the
+   * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+   * address). For now, only IPV4 addresses are supported.
+   * Examples: "203.0.113.0/24" -
+   * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+   * "0.0.0.0/0" - matches against any IP address.
+   * This field must contain at least one entry if the access type is EXTERNAL.
+   * The number of allowed CIDR blocks cannot exceed 500.
+   * Example: 192.168.0.0/16
+   * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedCidrBlocks. + */ + java.util.List getAllowedCidrBlocksList(); + + /** + * + * + *
+   * Optional. List of CIDR blocks that are allowed to access the Server.
+   * A CIDR range consists of an IP Address and a prefix length to construct the
+   * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+   * address). For now, only IPV4 addresses are supported.
+   * Examples: "203.0.113.0/24" -
+   * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+   * "0.0.0.0/0" - matches against any IP address.
+   * This field must contain at least one entry if the access type is EXTERNAL.
+   * The number of allowed CIDR blocks cannot exceed 500.
+   * Example: 192.168.0.0/16
+   * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedCidrBlocks. + */ + int getAllowedCidrBlocksCount(); + + /** + * + * + *
+   * Optional. List of CIDR blocks that are allowed to access the Server.
+   * A CIDR range consists of an IP Address and a prefix length to construct the
+   * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+   * address). For now, only IPV4 addresses are supported.
+   * Examples: "203.0.113.0/24" -
+   * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+   * "0.0.0.0/0" - matches against any IP address.
+   * This field must contain at least one entry if the access type is EXTERNAL.
+   * The number of allowed CIDR blocks cannot exceed 500.
+   * Example: 192.168.0.0/16
+   * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedCidrBlocks at the given index. + */ + java.lang.String getAllowedCidrBlocks(int index); + + /** + * + * + *
+   * Optional. List of CIDR blocks that are allowed to access the Server.
+   * A CIDR range consists of an IP Address and a prefix length to construct the
+   * subnet mask. By default, the prefix length is 32 (i.e. matches a single IP
+   * address). For now, only IPV4 addresses are supported.
+   * Examples: "203.0.113.0/24" -
+   * matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255.
+   * "0.0.0.0/0" - matches against any IP address.
+   * This field must contain at least one entry if the access type is EXTERNAL.
+   * The number of allowed CIDR blocks cannot exceed 500.
+   * Example: 192.168.0.0/16
+   * 
+ * + * repeated string allowed_cidr_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedCidrBlocks at the given index. + */ + com.google.protobuf.ByteString getAllowedCidrBlocksBytes(int index); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetServerRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetServerRequest.java new file mode 100644 index 000000000000..3d19d5076514 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetServerRequest.java @@ -0,0 +1,769 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for getting a Server
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.GetServerRequest} + */ +@com.google.protobuf.Generated +public final class GetServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.GetServerRequest) + GetServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetServerRequest"); + } + + // Use GetServerRequest.newBuilder() to construct. + private GetServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetServerRequest() { + name_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.GetServerRequest.class, + com.google.cloud.ftp.v1.GetServerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + + /** + * + * + *
+   * Optional. The view of the Server resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. The view of the Server resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerView getView() { + com.google.cloud.ftp.v1.ServerView result = com.google.cloud.ftp.v1.ServerView.forNumber(view_); + return result == null ? com.google.cloud.ftp.v1.ServerView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (view_ != com.google.cloud.ftp.v1.ServerView.SERVER_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (view_ != com.google.cloud.ftp.v1.ServerView.SERVER_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.GetServerRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.GetServerRequest other = (com.google.cloud.ftp.v1.GetServerRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.GetServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.GetServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a Server
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.GetServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.GetServerRequest) + com.google.cloud.ftp.v1.GetServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.GetServerRequest.class, + com.google.cloud.ftp.v1.GetServerRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.GetServerRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.GetServerRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.GetServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.GetServerRequest build() { + com.google.cloud.ftp.v1.GetServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.GetServerRequest buildPartial() { + com.google.cloud.ftp.v1.GetServerRequest result = + new com.google.cloud.ftp.v1.GetServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.GetServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.GetServerRequest) { + return mergeFrom((com.google.cloud.ftp.v1.GetServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.GetServerRequest other) { + if (other == com.google.cloud.ftp.v1.GetServerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerView getView() { + com.google.cloud.ftp.v1.ServerView result = + com.google.cloud.ftp.v1.ServerView.forNumber(view_); + return result == null ? com.google.cloud.ftp.v1.ServerView.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.ftp.v1.ServerView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.GetServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.GetServerRequest) + private static final com.google.cloud.ftp.v1.GetServerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.GetServerRequest(); + } + + public static com.google.cloud.ftp.v1.GetServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.GetServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetServerRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetServerRequestOrBuilder.java new file mode 100644 index 000000000000..36770e039014 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetServerRequestOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface GetServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.GetServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The view of the Server resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. The view of the Server resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.ServerView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.ftp.v1.ServerView getView(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetUserRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetUserRequest.java new file mode 100644 index 000000000000..ff5cd5e7a1da --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetUserRequest.java @@ -0,0 +1,766 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for getting a User
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.GetUserRequest} + */ +@com.google.protobuf.Generated +public final class GetUserRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.GetUserRequest) + GetUserRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetUserRequest"); + } + + // Use GetUserRequest.newBuilder() to construct. + private GetUserRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetUserRequest() { + name_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.GetUserRequest.class, + com.google.cloud.ftp.v1.GetUserRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + + /** + * + * + *
+   * Optional. The view of the User resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. The view of the User resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserView getView() { + com.google.cloud.ftp.v1.UserView result = com.google.cloud.ftp.v1.UserView.forNumber(view_); + return result == null ? com.google.cloud.ftp.v1.UserView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (view_ != com.google.cloud.ftp.v1.UserView.USER_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (view_ != com.google.cloud.ftp.v1.UserView.USER_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.GetUserRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.GetUserRequest other = (com.google.cloud.ftp.v1.GetUserRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.GetUserRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.GetUserRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a User
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.GetUserRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.GetUserRequest) + com.google.cloud.ftp.v1.GetUserRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.GetUserRequest.class, + com.google.cloud.ftp.v1.GetUserRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.GetUserRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_GetUserRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.GetUserRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.GetUserRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.GetUserRequest build() { + com.google.cloud.ftp.v1.GetUserRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.GetUserRequest buildPartial() { + com.google.cloud.ftp.v1.GetUserRequest result = + new com.google.cloud.ftp.v1.GetUserRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.GetUserRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.GetUserRequest) { + return mergeFrom((com.google.cloud.ftp.v1.GetUserRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.GetUserRequest other) { + if (other == com.google.cloud.ftp.v1.GetUserRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserView getView() { + com.google.cloud.ftp.v1.UserView result = com.google.cloud.ftp.v1.UserView.forNumber(view_); + return result == null ? com.google.cloud.ftp.v1.UserView.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.ftp.v1.UserView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.GetUserRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.GetUserRequest) + private static final com.google.cloud.ftp.v1.GetUserRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.GetUserRequest(); + } + + public static com.google.cloud.ftp.v1.GetUserRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetUserRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.GetUserRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetUserRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetUserRequestOrBuilder.java new file mode 100644 index 000000000000..382228d71802 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/GetUserRequestOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface GetUserRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.GetUserRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The view of the User resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. The view of the User resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.UserView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The view. + */ + com.google.cloud.ftp.v1.UserView getView(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/InternalServerConfig.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/InternalServerConfig.java new file mode 100644 index 000000000000..3ecd24be934b --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/InternalServerConfig.java @@ -0,0 +1,5257 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Configuration for private server accessible via PSC.
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.InternalServerConfig} + */ +@com.google.protobuf.Generated +public final class InternalServerConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.InternalServerConfig) + InternalServerConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InternalServerConfig"); + } + + // Use InternalServerConfig.newBuilder() to construct. + private InternalServerConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InternalServerConfig() { + serviceAttachment_ = ""; + consumerAcceptList_ = java.util.Collections.emptyList(); + consumerRejectList_ = java.util.Collections.emptyList(); + pscEndpoints_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.InternalServerConfig.class, + com.google.cloud.ftp.v1.InternalServerConfig.Builder.class); + } + + public interface AllowedConsumerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the project field is set. + */ + boolean hasProject(); + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The project. + */ + java.lang.String getProject(); + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+     * Required. The connection limit for the consumer.
+     * Value must be greater than 0.
+     * 
+ * + * int64 connection_limit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The connectionLimit. + */ + long getConnectionLimit(); + + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.ConsumerTypeCase + getConsumerTypeCase(); + } + + /** + * + * + *
+   * A consumer project or network that is permitted to connect to the server
+   * via PSC.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer} + */ + public static final class AllowedConsumer extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer) + AllowedConsumerOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AllowedConsumer"); + } + + // Use AllowedConsumer.newBuilder() to construct. + private AllowedConsumer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AllowedConsumer() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.class, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder.class); + } + + private int consumerTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object consumerType_; + + public enum ConsumerTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROJECT(1), + CONSUMERTYPE_NOT_SET(0); + private final int value; + + private ConsumerTypeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConsumerTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ConsumerTypeCase forNumber(int value) { + switch (value) { + case 1: + return PROJECT; + case 0: + return CONSUMERTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConsumerTypeCase getConsumerTypeCase() { + return ConsumerTypeCase.forNumber(consumerTypeCase_); + } + + public static final int PROJECT_FIELD_NUMBER = 1; + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the project field is set. + */ + public boolean hasProject() { + return consumerTypeCase_ == 1; + } + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = ""; + if (consumerTypeCase_ == 1) { + ref = consumerType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (consumerTypeCase_ == 1) { + consumerType_ = s; + } + return s; + } + } + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = ""; + if (consumerTypeCase_ == 1) { + ref = consumerType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (consumerTypeCase_ == 1) { + consumerType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONNECTION_LIMIT_FIELD_NUMBER = 2; + private long connectionLimit_ = 0L; + + /** + * + * + *
+     * Required. The connection limit for the consumer.
+     * Value must be greater than 0.
+     * 
+ * + * int64 connection_limit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The connectionLimit. + */ + @java.lang.Override + public long getConnectionLimit() { + return connectionLimit_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (consumerTypeCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, consumerType_); + } + if (connectionLimit_ != 0L) { + output.writeInt64(2, connectionLimit_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consumerTypeCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, consumerType_); + } + if (connectionLimit_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, connectionLimit_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer other = + (com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer) obj; + + if (getConnectionLimit() != other.getConnectionLimit()) return false; + if (!getConsumerTypeCase().equals(other.getConsumerTypeCase())) return false; + switch (consumerTypeCase_) { + case 1: + if (!getProject().equals(other.getProject())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONNECTION_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getConnectionLimit()); + switch (consumerTypeCase_) { + case 1: + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A consumer project or network that is permitted to connect to the server
+     * via PSC.
+     * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer) + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.class, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + connectionLimit_ = 0L; + consumerTypeCase_ = 0; + consumerType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer + getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer build() { + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer buildPartial() { + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer result = + new com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.connectionLimit_ = connectionLimit_; + } + } + + private void buildPartialOneofs( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer result) { + result.consumerTypeCase_ = consumerTypeCase_; + result.consumerType_ = this.consumerType_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer) { + return mergeFrom((com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer other) { + if (other + == com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.getDefaultInstance()) + return this; + if (other.getConnectionLimit() != 0L) { + setConnectionLimit(other.getConnectionLimit()); + } + switch (other.getConsumerTypeCase()) { + case PROJECT: + { + consumerTypeCase_ = 1; + consumerType_ = other.consumerType_; + onChanged(); + break; + } + case CONSUMERTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + consumerTypeCase_ = 1; + consumerType_ = s; + break; + } // case 10 + case 16: + { + connectionLimit_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int consumerTypeCase_ = 0; + private java.lang.Object consumerType_; + + public ConsumerTypeCase getConsumerTypeCase() { + return ConsumerTypeCase.forNumber(consumerTypeCase_); + } + + public Builder clearConsumerType() { + consumerTypeCase_ = 0; + consumerType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the project field is set. + */ + @java.lang.Override + public boolean hasProject() { + return consumerTypeCase_ == 1; + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = ""; + if (consumerTypeCase_ == 1) { + ref = consumerType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (consumerTypeCase_ == 1) { + consumerType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = ""; + if (consumerTypeCase_ == 1) { + ref = consumerType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (consumerTypeCase_ == 1) { + consumerType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + consumerTypeCase_ = 1; + consumerType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearProject() { + if (consumerTypeCase_ == 1) { + consumerTypeCase_ = 0; + consumerType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + consumerTypeCase_ = 1; + consumerType_ = value; + onChanged(); + return this; + } + + private long connectionLimit_; + + /** + * + * + *
+       * Required. The connection limit for the consumer.
+       * Value must be greater than 0.
+       * 
+ * + * int64 connection_limit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The connectionLimit. + */ + @java.lang.Override + public long getConnectionLimit() { + return connectionLimit_; + } + + /** + * + * + *
+       * Required. The connection limit for the consumer.
+       * Value must be greater than 0.
+       * 
+ * + * int64 connection_limit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The connectionLimit to set. + * @return This builder for chaining. + */ + public Builder setConnectionLimit(long value) { + + connectionLimit_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The connection limit for the consumer.
+       * Value must be greater than 0.
+       * 
+ * + * int64 connection_limit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearConnectionLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + connectionLimit_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer) + private static final com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer(); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllowedConsumer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeniedConsumerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the project field is set. + */ + boolean hasProject(); + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The project. + */ + java.lang.String getProject(); + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.ConsumerTypeCase + getConsumerTypeCase(); + } + + /** + * + * + *
+   * A consumer project or network that is denied to connect to the server via
+   * PSC.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer} + */ + public static final class DeniedConsumer extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer) + DeniedConsumerOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeniedConsumer"); + } + + // Use DeniedConsumer.newBuilder() to construct. + private DeniedConsumer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeniedConsumer() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.class, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder.class); + } + + private int consumerTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object consumerType_; + + public enum ConsumerTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROJECT(1), + CONSUMERTYPE_NOT_SET(0); + private final int value; + + private ConsumerTypeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConsumerTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ConsumerTypeCase forNumber(int value) { + switch (value) { + case 1: + return PROJECT; + case 0: + return CONSUMERTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConsumerTypeCase getConsumerTypeCase() { + return ConsumerTypeCase.forNumber(consumerTypeCase_); + } + + public static final int PROJECT_FIELD_NUMBER = 1; + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the project field is set. + */ + public boolean hasProject() { + return consumerTypeCase_ == 1; + } + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = ""; + if (consumerTypeCase_ == 1) { + ref = consumerType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (consumerTypeCase_ == 1) { + consumerType_ = s; + } + return s; + } + } + + /** + * + * + *
+     * The project ID or number of the consumer project.
+     * Must be in the format: `projects/{project}`.
+     * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = ""; + if (consumerTypeCase_ == 1) { + ref = consumerType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (consumerTypeCase_ == 1) { + consumerType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (consumerTypeCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, consumerType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consumerTypeCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, consumerType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer other = + (com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer) obj; + + if (!getConsumerTypeCase().equals(other.getConsumerTypeCase())) return false; + switch (consumerTypeCase_) { + case 1: + if (!getProject().equals(other.getProject())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (consumerTypeCase_) { + case 1: + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A consumer project or network that is denied to connect to the server via
+     * PSC.
+     * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer) + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.class, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consumerTypeCase_ = 0; + consumerType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer + getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer build() { + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer buildPartial() { + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer result = + new com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer result) { + result.consumerTypeCase_ = consumerTypeCase_; + result.consumerType_ = this.consumerType_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer) { + return mergeFrom((com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer other) { + if (other + == com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.getDefaultInstance()) + return this; + switch (other.getConsumerTypeCase()) { + case PROJECT: + { + consumerTypeCase_ = 1; + consumerType_ = other.consumerType_; + onChanged(); + break; + } + case CONSUMERTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + consumerTypeCase_ = 1; + consumerType_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int consumerTypeCase_ = 0; + private java.lang.Object consumerType_; + + public ConsumerTypeCase getConsumerTypeCase() { + return ConsumerTypeCase.forNumber(consumerTypeCase_); + } + + public Builder clearConsumerType() { + consumerTypeCase_ = 0; + consumerType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the project field is set. + */ + @java.lang.Override + public boolean hasProject() { + return consumerTypeCase_ == 1; + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = ""; + if (consumerTypeCase_ == 1) { + ref = consumerType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (consumerTypeCase_ == 1) { + consumerType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = ""; + if (consumerTypeCase_ == 1) { + ref = consumerType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (consumerTypeCase_ == 1) { + consumerType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + consumerTypeCase_ = 1; + consumerType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearProject() { + if (consumerTypeCase_ == 1) { + consumerTypeCase_ = 0; + consumerType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The project ID or number of the consumer project.
+       * Must be in the format: `projects/{project}`.
+       * 
+ * + * string project = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + consumerTypeCase_ = 1; + consumerType_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer) + private static final com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer(); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeniedConsumer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PscEndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.InternalServerConfig.PscEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. This is a Resource name for Private Service Connect
+     * endpoint. Format:
+     * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + + /** + * + * + *
+     * Output only. This is a Resource name for Private Service Connect
+     * endpoint. Format:
+     * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); + + /** + * + * + *
+     * Output only. The consumer network.
+     * Format: `projects/{project}/locations/{location}/networks/{network}`
+     * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + java.lang.String getNetwork(); + + /** + * + * + *
+     * Output only. The consumer network.
+     * Format: `projects/{project}/locations/{location}/networks/{network}`
+     * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+     * Output only. The status of the connected endpoint.
+     * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The status. + */ + java.lang.String getStatus(); + + /** + * + * + *
+     * Output only. The status of the connected endpoint.
+     * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for status. + */ + com.google.protobuf.ByteString getStatusBytes(); + } + + /** + * + * + *
+   * Details of PSC endpoint created by customer.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.InternalServerConfig.PscEndpoint} + */ + public static final class PscEndpoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.InternalServerConfig.PscEndpoint) + PscEndpointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "PscEndpoint"); + } + + // Use PscEndpoint.newBuilder() to construct. + private PscEndpoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PscEndpoint() { + endpoint_ = ""; + network_ = ""; + status_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.class, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder.class); + } + + public static final int ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object endpoint_ = ""; + + /** + * + * + *
+     * Output only. This is a Resource name for Private Service Connect
+     * endpoint. Format:
+     * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. This is a Resource name for Private Service Connect
+     * endpoint. Format:
+     * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+     * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + + /** + * + * + *
+     * Output only. The consumer network.
+     * Format: `projects/{project}/locations/{location}/networks/{network}`
+     * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The consumer network.
+     * Format: `projects/{project}/locations/{location}/networks/{network}`
+     * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object status_ = ""; + + /** + * + * + *
+     * Output only. The status of the connected endpoint.
+     * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The status. + */ + @java.lang.Override + public java.lang.String getStatus() { + java.lang.Object ref = status_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + status_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The status of the connected endpoint.
+     * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for status. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusBytes() { + java.lang.Object ref = status_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + status_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpoint_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, network_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(status_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, status_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpoint_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpoint_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, network_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(status_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, status_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint other = + (com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getStatus().equals(other.getStatus())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Details of PSC endpoint created by customer.
+     * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.InternalServerConfig.PscEndpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.InternalServerConfig.PscEndpoint) + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.class, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + network_ = ""; + status_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint build() { + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint buildPartial() { + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint result = + new com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.status_ = status_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint) { + return mergeFrom((com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint other) { + if (other == com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getStatus().isEmpty()) { + status_ = other.status_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object endpoint_ = ""; + + /** + * + * + *
+       * Output only. This is a Resource name for Private Service Connect
+       * endpoint. Format:
+       * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+       * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. This is a Resource name for Private Service Connect
+       * endpoint. Format:
+       * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+       * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. This is a Resource name for Private Service Connect
+       * endpoint. Format:
+       * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+       * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. This is a Resource name for Private Service Connect
+       * endpoint. Format:
+       * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+       * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + endpoint_ = getDefaultInstance().getEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. This is a Resource name for Private Service Connect
+       * endpoint. Format:
+       * `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
+       * 
+ * + * + * string endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + + /** + * + * + *
+       * Output only. The consumer network.
+       * Format: `projects/{project}/locations/{location}/networks/{network}`
+       * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The consumer network.
+       * Format: `projects/{project}/locations/{location}/networks/{network}`
+       * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The consumer network.
+       * Format: `projects/{project}/locations/{location}/networks/{network}`
+       * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The consumer network.
+       * Format: `projects/{project}/locations/{location}/networks/{network}`
+       * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The consumer network.
+       * Format: `projects/{project}/locations/{location}/networks/{network}`
+       * 
+ * + * + * string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object status_ = ""; + + /** + * + * + *
+       * Output only. The status of the connected endpoint.
+       * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The status. + */ + public java.lang.String getStatus() { + java.lang.Object ref = status_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + status_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The status of the connected endpoint.
+       * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for status. + */ + public com.google.protobuf.ByteString getStatusBytes() { + java.lang.Object ref = status_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + status_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The status of the connected endpoint.
+       * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The status of the connected endpoint.
+       * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + status_ = getDefaultInstance().getStatus(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The status of the connected endpoint.
+       * 
+ * + * string status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for status to set. + * @return This builder for chaining. + */ + public Builder setStatusBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + status_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.InternalServerConfig.PscEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.InternalServerConfig.PscEndpoint) + private static final com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint(); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SERVICE_ATTACHMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAttachment_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the service attachment.
+   * Format:
+   * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+   * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAttachment. + */ + @java.lang.Override + public java.lang.String getServiceAttachment() { + java.lang.Object ref = serviceAttachment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAttachment_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the service attachment.
+   * Format:
+   * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+   * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAttachment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAttachmentBytes() { + java.lang.Object ref = serviceAttachment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSUMER_ACCEPT_LIST_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + consumerAcceptList_; + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getConsumerAcceptListList() { + return consumerAcceptList_; + } + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder> + getConsumerAcceptListOrBuilderList() { + return consumerAcceptList_; + } + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getConsumerAcceptListCount() { + return consumerAcceptList_.size(); + } + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer getConsumerAcceptList( + int index) { + return consumerAcceptList_.get(index); + } + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder + getConsumerAcceptListOrBuilder(int index) { + return consumerAcceptList_.get(index); + } + + public static final int CONSUMER_REJECT_LIST_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + consumerRejectList_; + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getConsumerRejectListList() { + return consumerRejectList_; + } + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder> + getConsumerRejectListOrBuilderList() { + return consumerRejectList_; + } + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getConsumerRejectListCount() { + return consumerRejectList_.size(); + } + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer getConsumerRejectList( + int index) { + return consumerRejectList_.get(index); + } + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder + getConsumerRejectListOrBuilder(int index) { + return consumerRejectList_.get(index); + } + + public static final int PSC_ENDPOINTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List pscEndpoints_; + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPscEndpointsList() { + return pscEndpoints_; + } + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPscEndpointsOrBuilderList() { + return pscEndpoints_; + } + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPscEndpointsCount() { + return pscEndpoints_.size(); + } + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint getPscEndpoints(int index) { + return pscEndpoints_.get(index); + } + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpointOrBuilder getPscEndpointsOrBuilder( + int index) { + return pscEndpoints_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAttachment_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, serviceAttachment_); + } + for (int i = 0; i < consumerAcceptList_.size(); i++) { + output.writeMessage(2, consumerAcceptList_.get(i)); + } + for (int i = 0; i < consumerRejectList_.size(); i++) { + output.writeMessage(3, consumerRejectList_.get(i)); + } + for (int i = 0; i < pscEndpoints_.size(); i++) { + output.writeMessage(4, pscEndpoints_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAttachment_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, serviceAttachment_); + } + for (int i = 0; i < consumerAcceptList_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, consumerAcceptList_.get(i)); + } + for (int i = 0; i < consumerRejectList_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, consumerRejectList_.get(i)); + } + for (int i = 0; i < pscEndpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, pscEndpoints_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.InternalServerConfig)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.InternalServerConfig other = + (com.google.cloud.ftp.v1.InternalServerConfig) obj; + + if (!getServiceAttachment().equals(other.getServiceAttachment())) return false; + if (!getConsumerAcceptListList().equals(other.getConsumerAcceptListList())) return false; + if (!getConsumerRejectListList().equals(other.getConsumerRejectListList())) return false; + if (!getPscEndpointsList().equals(other.getPscEndpointsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAttachment().hashCode(); + if (getConsumerAcceptListCount() > 0) { + hash = (37 * hash) + CONSUMER_ACCEPT_LIST_FIELD_NUMBER; + hash = (53 * hash) + getConsumerAcceptListList().hashCode(); + } + if (getConsumerRejectListCount() > 0) { + hash = (37 * hash) + CONSUMER_REJECT_LIST_FIELD_NUMBER; + hash = (53 * hash) + getConsumerRejectListList().hashCode(); + } + if (getPscEndpointsCount() > 0) { + hash = (37 * hash) + PSC_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getPscEndpointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.InternalServerConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Configuration for private server accessible via PSC.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.InternalServerConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.InternalServerConfig) + com.google.cloud.ftp.v1.InternalServerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.InternalServerConfig.class, + com.google.cloud.ftp.v1.InternalServerConfig.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.InternalServerConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceAttachment_ = ""; + if (consumerAcceptListBuilder_ == null) { + consumerAcceptList_ = java.util.Collections.emptyList(); + } else { + consumerAcceptList_ = null; + consumerAcceptListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (consumerRejectListBuilder_ == null) { + consumerRejectList_ = java.util.Collections.emptyList(); + } else { + consumerRejectList_ = null; + consumerRejectListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (pscEndpointsBuilder_ == null) { + pscEndpoints_ = java.util.Collections.emptyList(); + } else { + pscEndpoints_ = null; + pscEndpointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig build() { + com.google.cloud.ftp.v1.InternalServerConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig buildPartial() { + com.google.cloud.ftp.v1.InternalServerConfig result = + new com.google.cloud.ftp.v1.InternalServerConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.ftp.v1.InternalServerConfig result) { + if (consumerAcceptListBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + consumerAcceptList_ = java.util.Collections.unmodifiableList(consumerAcceptList_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.consumerAcceptList_ = consumerAcceptList_; + } else { + result.consumerAcceptList_ = consumerAcceptListBuilder_.build(); + } + if (consumerRejectListBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + consumerRejectList_ = java.util.Collections.unmodifiableList(consumerRejectList_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.consumerRejectList_ = consumerRejectList_; + } else { + result.consumerRejectList_ = consumerRejectListBuilder_.build(); + } + if (pscEndpointsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pscEndpoints_ = java.util.Collections.unmodifiableList(pscEndpoints_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pscEndpoints_ = pscEndpoints_; + } else { + result.pscEndpoints_ = pscEndpointsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.ftp.v1.InternalServerConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceAttachment_ = serviceAttachment_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.InternalServerConfig) { + return mergeFrom((com.google.cloud.ftp.v1.InternalServerConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.InternalServerConfig other) { + if (other == com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance()) return this; + if (!other.getServiceAttachment().isEmpty()) { + serviceAttachment_ = other.serviceAttachment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (consumerAcceptListBuilder_ == null) { + if (!other.consumerAcceptList_.isEmpty()) { + if (consumerAcceptList_.isEmpty()) { + consumerAcceptList_ = other.consumerAcceptList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.addAll(other.consumerAcceptList_); + } + onChanged(); + } + } else { + if (!other.consumerAcceptList_.isEmpty()) { + if (consumerAcceptListBuilder_.isEmpty()) { + consumerAcceptListBuilder_.dispose(); + consumerAcceptListBuilder_ = null; + consumerAcceptList_ = other.consumerAcceptList_; + bitField0_ = (bitField0_ & ~0x00000002); + consumerAcceptListBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetConsumerAcceptListFieldBuilder() + : null; + } else { + consumerAcceptListBuilder_.addAllMessages(other.consumerAcceptList_); + } + } + } + if (consumerRejectListBuilder_ == null) { + if (!other.consumerRejectList_.isEmpty()) { + if (consumerRejectList_.isEmpty()) { + consumerRejectList_ = other.consumerRejectList_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureConsumerRejectListIsMutable(); + consumerRejectList_.addAll(other.consumerRejectList_); + } + onChanged(); + } + } else { + if (!other.consumerRejectList_.isEmpty()) { + if (consumerRejectListBuilder_.isEmpty()) { + consumerRejectListBuilder_.dispose(); + consumerRejectListBuilder_ = null; + consumerRejectList_ = other.consumerRejectList_; + bitField0_ = (bitField0_ & ~0x00000004); + consumerRejectListBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetConsumerRejectListFieldBuilder() + : null; + } else { + consumerRejectListBuilder_.addAllMessages(other.consumerRejectList_); + } + } + } + if (pscEndpointsBuilder_ == null) { + if (!other.pscEndpoints_.isEmpty()) { + if (pscEndpoints_.isEmpty()) { + pscEndpoints_ = other.pscEndpoints_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePscEndpointsIsMutable(); + pscEndpoints_.addAll(other.pscEndpoints_); + } + onChanged(); + } + } else { + if (!other.pscEndpoints_.isEmpty()) { + if (pscEndpointsBuilder_.isEmpty()) { + pscEndpointsBuilder_.dispose(); + pscEndpointsBuilder_ = null; + pscEndpoints_ = other.pscEndpoints_; + bitField0_ = (bitField0_ & ~0x00000008); + pscEndpointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPscEndpointsFieldBuilder() + : null; + } else { + pscEndpointsBuilder_.addAllMessages(other.pscEndpoints_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serviceAttachment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer m = + input.readMessage( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.parser(), + extensionRegistry); + if (consumerAcceptListBuilder_ == null) { + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.add(m); + } else { + consumerAcceptListBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer m = + input.readMessage( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.parser(), + extensionRegistry); + if (consumerRejectListBuilder_ == null) { + ensureConsumerRejectListIsMutable(); + consumerRejectList_.add(m); + } else { + consumerRejectListBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint m = + input.readMessage( + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.parser(), + extensionRegistry); + if (pscEndpointsBuilder_ == null) { + ensurePscEndpointsIsMutable(); + pscEndpoints_.add(m); + } else { + pscEndpointsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object serviceAttachment_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the service attachment.
+     * Format:
+     * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+     * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAttachment. + */ + public java.lang.String getServiceAttachment() { + java.lang.Object ref = serviceAttachment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAttachment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the service attachment.
+     * Format:
+     * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+     * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAttachment. + */ + public com.google.protobuf.ByteString getServiceAttachmentBytes() { + java.lang.Object ref = serviceAttachment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the service attachment.
+     * Format:
+     * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+     * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The serviceAttachment to set. + * @return This builder for chaining. + */ + public Builder setServiceAttachment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAttachment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the service attachment.
+     * Format:
+     * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+     * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearServiceAttachment() { + serviceAttachment_ = getDefaultInstance().getServiceAttachment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the service attachment.
+     * Format:
+     * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+     * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for serviceAttachment to set. + * @return This builder for chaining. + */ + public Builder setServiceAttachmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAttachment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + consumerAcceptList_ = java.util.Collections.emptyList(); + + private void ensureConsumerAcceptListIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + consumerAcceptList_ = + new java.util.ArrayList( + consumerAcceptList_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder> + consumerAcceptListBuilder_; + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getConsumerAcceptListList() { + if (consumerAcceptListBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumerAcceptList_); + } else { + return consumerAcceptListBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getConsumerAcceptListCount() { + if (consumerAcceptListBuilder_ == null) { + return consumerAcceptList_.size(); + } else { + return consumerAcceptListBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer getConsumerAcceptList( + int index) { + if (consumerAcceptListBuilder_ == null) { + return consumerAcceptList_.get(index); + } else { + return consumerAcceptListBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConsumerAcceptList( + int index, com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer value) { + if (consumerAcceptListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.set(index, value); + onChanged(); + } else { + consumerAcceptListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConsumerAcceptList( + int index, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder builderForValue) { + if (consumerAcceptListBuilder_ == null) { + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.set(index, builderForValue.build()); + onChanged(); + } else { + consumerAcceptListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addConsumerAcceptList( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer value) { + if (consumerAcceptListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.add(value); + onChanged(); + } else { + consumerAcceptListBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addConsumerAcceptList( + int index, com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer value) { + if (consumerAcceptListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.add(index, value); + onChanged(); + } else { + consumerAcceptListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addConsumerAcceptList( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder builderForValue) { + if (consumerAcceptListBuilder_ == null) { + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.add(builderForValue.build()); + onChanged(); + } else { + consumerAcceptListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addConsumerAcceptList( + int index, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder builderForValue) { + if (consumerAcceptListBuilder_ == null) { + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.add(index, builderForValue.build()); + onChanged(); + } else { + consumerAcceptListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllConsumerAcceptList( + java.lang.Iterable + values) { + if (consumerAcceptListBuilder_ == null) { + ensureConsumerAcceptListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumerAcceptList_); + onChanged(); + } else { + consumerAcceptListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConsumerAcceptList() { + if (consumerAcceptListBuilder_ == null) { + consumerAcceptList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + consumerAcceptListBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeConsumerAcceptList(int index) { + if (consumerAcceptListBuilder_ == null) { + ensureConsumerAcceptListIsMutable(); + consumerAcceptList_.remove(index); + onChanged(); + } else { + consumerAcceptListBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder + getConsumerAcceptListBuilder(int index) { + return internalGetConsumerAcceptListFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder + getConsumerAcceptListOrBuilder(int index) { + if (consumerAcceptListBuilder_ == null) { + return consumerAcceptList_.get(index); + } else { + return consumerAcceptListBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder> + getConsumerAcceptListOrBuilderList() { + if (consumerAcceptListBuilder_ != null) { + return consumerAcceptListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumerAcceptList_); + } + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder + addConsumerAcceptListBuilder() { + return internalGetConsumerAcceptListFieldBuilder() + .addBuilder( + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder + addConsumerAcceptListBuilder(int index) { + return internalGetConsumerAcceptListFieldBuilder() + .addBuilder( + index, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of projects that are permitted to connect.
+     * At least one project is required in the allow list.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getConsumerAcceptListBuilderList() { + return internalGetConsumerAcceptListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder> + internalGetConsumerAcceptListFieldBuilder() { + if (consumerAcceptListBuilder_ == null) { + consumerAcceptListBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder>( + consumerAcceptList_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + consumerAcceptList_ = null; + } + return consumerAcceptListBuilder_; + } + + private java.util.List + consumerRejectList_ = java.util.Collections.emptyList(); + + private void ensureConsumerRejectListIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + consumerRejectList_ = + new java.util.ArrayList( + consumerRejectList_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder> + consumerRejectListBuilder_; + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getConsumerRejectListList() { + if (consumerRejectListBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumerRejectList_); + } else { + return consumerRejectListBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getConsumerRejectListCount() { + if (consumerRejectListBuilder_ == null) { + return consumerRejectList_.size(); + } else { + return consumerRejectListBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer getConsumerRejectList( + int index) { + if (consumerRejectListBuilder_ == null) { + return consumerRejectList_.get(index); + } else { + return consumerRejectListBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConsumerRejectList( + int index, com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer value) { + if (consumerRejectListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerRejectListIsMutable(); + consumerRejectList_.set(index, value); + onChanged(); + } else { + consumerRejectListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConsumerRejectList( + int index, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder builderForValue) { + if (consumerRejectListBuilder_ == null) { + ensureConsumerRejectListIsMutable(); + consumerRejectList_.set(index, builderForValue.build()); + onChanged(); + } else { + consumerRejectListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConsumerRejectList( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer value) { + if (consumerRejectListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerRejectListIsMutable(); + consumerRejectList_.add(value); + onChanged(); + } else { + consumerRejectListBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConsumerRejectList( + int index, com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer value) { + if (consumerRejectListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerRejectListIsMutable(); + consumerRejectList_.add(index, value); + onChanged(); + } else { + consumerRejectListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConsumerRejectList( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder builderForValue) { + if (consumerRejectListBuilder_ == null) { + ensureConsumerRejectListIsMutable(); + consumerRejectList_.add(builderForValue.build()); + onChanged(); + } else { + consumerRejectListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addConsumerRejectList( + int index, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder builderForValue) { + if (consumerRejectListBuilder_ == null) { + ensureConsumerRejectListIsMutable(); + consumerRejectList_.add(index, builderForValue.build()); + onChanged(); + } else { + consumerRejectListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllConsumerRejectList( + java.lang.Iterable + values) { + if (consumerRejectListBuilder_ == null) { + ensureConsumerRejectListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumerRejectList_); + onChanged(); + } else { + consumerRejectListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConsumerRejectList() { + if (consumerRejectListBuilder_ == null) { + consumerRejectList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + consumerRejectListBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeConsumerRejectList(int index) { + if (consumerRejectListBuilder_ == null) { + ensureConsumerRejectListIsMutable(); + consumerRejectList_.remove(index); + onChanged(); + } else { + consumerRejectListBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder + getConsumerRejectListBuilder(int index) { + return internalGetConsumerRejectListFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder + getConsumerRejectListOrBuilder(int index) { + if (consumerRejectListBuilder_ == null) { + return consumerRejectList_.get(index); + } else { + return consumerRejectListBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder> + getConsumerRejectListOrBuilderList() { + if (consumerRejectListBuilder_ != null) { + return consumerRejectListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumerRejectList_); + } + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder + addConsumerRejectListBuilder() { + return internalGetConsumerRejectListFieldBuilder() + .addBuilder( + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder + addConsumerRejectListBuilder(int index) { + return internalGetConsumerRejectListFieldBuilder() + .addBuilder( + index, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of projects that are denied connection.
+     * Format: "projects/sample_project_id" or "projects/1234567890"
+     * Projects in this list will be denied access, even if they are included in
+     * the `allow_list`. If this list is empty, no projects are explicitly
+     * rejected.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getConsumerRejectListBuilderList() { + return internalGetConsumerRejectListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder> + internalGetConsumerRejectListFieldBuilder() { + if (consumerRejectListBuilder_ == null) { + consumerRejectListBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder>( + consumerRejectList_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + consumerRejectList_ = null; + } + return consumerRejectListBuilder_; + } + + private java.util.List pscEndpoints_ = + java.util.Collections.emptyList(); + + private void ensurePscEndpointsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pscEndpoints_ = + new java.util.ArrayList( + pscEndpoints_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpointOrBuilder> + pscEndpointsBuilder_; + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPscEndpointsList() { + if (pscEndpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pscEndpoints_); + } else { + return pscEndpointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPscEndpointsCount() { + if (pscEndpointsBuilder_ == null) { + return pscEndpoints_.size(); + } else { + return pscEndpointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint getPscEndpoints(int index) { + if (pscEndpointsBuilder_ == null) { + return pscEndpoints_.get(index); + } else { + return pscEndpointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscEndpoints( + int index, com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint value) { + if (pscEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscEndpointsIsMutable(); + pscEndpoints_.set(index, value); + onChanged(); + } else { + pscEndpointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscEndpoints( + int index, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder builderForValue) { + if (pscEndpointsBuilder_ == null) { + ensurePscEndpointsIsMutable(); + pscEndpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + pscEndpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscEndpoints(com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint value) { + if (pscEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscEndpointsIsMutable(); + pscEndpoints_.add(value); + onChanged(); + } else { + pscEndpointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscEndpoints( + int index, com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint value) { + if (pscEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscEndpointsIsMutable(); + pscEndpoints_.add(index, value); + onChanged(); + } else { + pscEndpointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscEndpoints( + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder builderForValue) { + if (pscEndpointsBuilder_ == null) { + ensurePscEndpointsIsMutable(); + pscEndpoints_.add(builderForValue.build()); + onChanged(); + } else { + pscEndpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscEndpoints( + int index, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder builderForValue) { + if (pscEndpointsBuilder_ == null) { + ensurePscEndpointsIsMutable(); + pscEndpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + pscEndpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPscEndpoints( + java.lang.Iterable + values) { + if (pscEndpointsBuilder_ == null) { + ensurePscEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pscEndpoints_); + onChanged(); + } else { + pscEndpointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPscEndpoints() { + if (pscEndpointsBuilder_ == null) { + pscEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pscEndpointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePscEndpoints(int index) { + if (pscEndpointsBuilder_ == null) { + ensurePscEndpointsIsMutable(); + pscEndpoints_.remove(index); + onChanged(); + } else { + pscEndpointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder getPscEndpointsBuilder( + int index) { + return internalGetPscEndpointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpointOrBuilder + getPscEndpointsOrBuilder(int index) { + if (pscEndpointsBuilder_ == null) { + return pscEndpoints_.get(index); + } else { + return pscEndpointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.ftp.v1.InternalServerConfig.PscEndpointOrBuilder> + getPscEndpointsOrBuilderList() { + if (pscEndpointsBuilder_ != null) { + return pscEndpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pscEndpoints_); + } + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder + addPscEndpointsBuilder() { + return internalGetPscEndpointsFieldBuilder() + .addBuilder( + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder addPscEndpointsBuilder( + int index) { + return internalGetPscEndpointsFieldBuilder() + .addBuilder( + index, com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Details of endpoints created by the customer.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPscEndpointsBuilderList() { + return internalGetPscEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpointOrBuilder> + internalGetPscEndpointsFieldBuilder() { + if (pscEndpointsBuilder_ == null) { + pscEndpointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint.Builder, + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpointOrBuilder>( + pscEndpoints_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + pscEndpoints_ = null; + } + return pscEndpointsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.InternalServerConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.InternalServerConfig) + private static final com.google.cloud.ftp.v1.InternalServerConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.InternalServerConfig(); + } + + public static com.google.cloud.ftp.v1.InternalServerConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InternalServerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/InternalServerConfigOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/InternalServerConfigOrBuilder.java new file mode 100644 index 000000000000..9de3bd10a08a --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/InternalServerConfigOrBuilder.java @@ -0,0 +1,290 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface InternalServerConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.InternalServerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the service attachment.
+   * Format:
+   * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+   * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAttachment. + */ + java.lang.String getServiceAttachment(); + + /** + * + * + *
+   * Output only. The resource name of the service attachment.
+   * Format:
+   * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
+   * 
+ * + * + * string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAttachment. + */ + com.google.protobuf.ByteString getServiceAttachmentBytes(); + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getConsumerAcceptListList(); + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer getConsumerAcceptList(int index); + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getConsumerAcceptListCount(); + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getConsumerAcceptListOrBuilderList(); + + /** + * + * + *
+   * Required. A list of projects that are permitted to connect.
+   * At least one project is required in the allow list.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.AllowedConsumer consumer_accept_list = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerOrBuilder + getConsumerAcceptListOrBuilder(int index); + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getConsumerRejectListList(); + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer getConsumerRejectList(int index); + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getConsumerRejectListCount(); + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getConsumerRejectListOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of projects that are denied connection.
+   * Format: "projects/sample_project_id" or "projects/1234567890"
+   * Projects in this list will be denied access, even if they are included in
+   * the `allow_list`. If this list is empty, no projects are explicitly
+   * rejected.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.DeniedConsumer consumer_reject_list = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerOrBuilder + getConsumerRejectListOrBuilder(int index); + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPscEndpointsList(); + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpoint getPscEndpoints(int index); + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPscEndpointsCount(); + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getPscEndpointsOrBuilderList(); + + /** + * + * + *
+   * Output only. Details of endpoints created by the customer.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.InternalServerConfig.PscEndpoint psc_endpoints = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.ftp.v1.InternalServerConfig.PscEndpointOrBuilder getPscEndpointsOrBuilder( + int index); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersRequest.java new file mode 100644 index 000000000000..dba31b7c247a --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersRequest.java @@ -0,0 +1,1438 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for requesting list of Servers
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ListServersRequest} + */ +@com.google.protobuf.Generated +public final class ListServersRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.ListServersRequest) + ListServersRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListServersRequest"); + } + + // Use ListServersRequest.newBuilder() to construct. + private ListServersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListServersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ListServersRequest.class, + com.google.cloud.ftp.v1.ListServersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListServersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent value for ListServersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + + /** + * + * + *
+   * Optional. The view of the Server resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. The view of the Server resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerView getView() { + com.google.cloud.ftp.v1.ServerView result = com.google.cloud.ftp.v1.ServerView.forNumber(view_); + return result == null ? com.google.cloud.ftp.v1.ServerView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (view_ != com.google.cloud.ftp.v1.ServerView.SERVER_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (view_ != com.google.cloud.ftp.v1.ServerView.SERVER_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.ListServersRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.ListServersRequest other = + (com.google.cloud.ftp.v1.ListServersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListServersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.ListServersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of Servers
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ListServersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.ListServersRequest) + com.google.cloud.ftp.v1.ListServersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ListServersRequest.class, + com.google.cloud.ftp.v1.ListServersRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.ListServersRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListServersRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.ListServersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListServersRequest build() { + com.google.cloud.ftp.v1.ListServersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListServersRequest buildPartial() { + com.google.cloud.ftp.v1.ListServersRequest result = + new com.google.cloud.ftp.v1.ListServersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.ListServersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.ListServersRequest) { + return mergeFrom((com.google.cloud.ftp.v1.ListServersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.ListServersRequest other) { + if (other == com.google.cloud.ftp.v1.ListServersRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListServersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListServersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListServersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListServersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListServersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerView getView() { + com.google.cloud.ftp.v1.ServerView result = + com.google.cloud.ftp.v1.ServerView.forNumber(view_); + return result == null ? com.google.cloud.ftp.v1.ServerView.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.ftp.v1.ServerView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the Server resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.ListServersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.ListServersRequest) + private static final com.google.cloud.ftp.v1.ListServersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.ListServersRequest(); + } + + public static com.google.cloud.ftp.v1.ListServersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListServersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersRequestOrBuilder.java new file mode 100644 index 000000000000..0b3613e33fea --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersRequestOrBuilder.java @@ -0,0 +1,178 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface ListServersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.ListServersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListServersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListServersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. The view of the Server resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. The view of the Server resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.ServerView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.ftp.v1.ServerView getView(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersResponse.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersResponse.java new file mode 100644 index 000000000000..f14143fe7c1c --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersResponse.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for response to listing Servers
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ListServersResponse} + */ +@com.google.protobuf.Generated +public final class ListServersResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.ListServersResponse) + ListServersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListServersResponse"); + } + + // Use ListServersResponse.newBuilder() to construct. + private ListServersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListServersResponse() { + servers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ListServersResponse.class, + com.google.cloud.ftp.v1.ListServersResponse.Builder.class); + } + + public static final int SERVERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List servers_; + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + @java.lang.Override + public java.util.List getServersList() { + return servers_; + } + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + @java.lang.Override + public java.util.List + getServersOrBuilderList() { + return servers_; + } + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + @java.lang.Override + public int getServersCount() { + return servers_.size(); + } + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.Server getServers(int index) { + return servers_.get(index); + } + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerOrBuilder getServersOrBuilder(int index) { + return servers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < servers_.size(); i++) { + output.writeMessage(1, servers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < servers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, servers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.ListServersResponse)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.ListServersResponse other = + (com.google.cloud.ftp.v1.ListServersResponse) obj; + + if (!getServersList().equals(other.getServersList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServersCount() > 0) { + hash = (37 * hash) + SERVERS_FIELD_NUMBER; + hash = (53 * hash) + getServersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListServersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.ListServersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing Servers
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ListServersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.ListServersResponse) + com.google.cloud.ftp.v1.ListServersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ListServersResponse.class, + com.google.cloud.ftp.v1.ListServersResponse.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.ListServersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (serversBuilder_ == null) { + servers_ = java.util.Collections.emptyList(); + } else { + servers_ = null; + serversBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListServersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListServersResponse getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.ListServersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListServersResponse build() { + com.google.cloud.ftp.v1.ListServersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListServersResponse buildPartial() { + com.google.cloud.ftp.v1.ListServersResponse result = + new com.google.cloud.ftp.v1.ListServersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.ftp.v1.ListServersResponse result) { + if (serversBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + servers_ = java.util.Collections.unmodifiableList(servers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.servers_ = servers_; + } else { + result.servers_ = serversBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.ftp.v1.ListServersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.ListServersResponse) { + return mergeFrom((com.google.cloud.ftp.v1.ListServersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.ListServersResponse other) { + if (other == com.google.cloud.ftp.v1.ListServersResponse.getDefaultInstance()) return this; + if (serversBuilder_ == null) { + if (!other.servers_.isEmpty()) { + if (servers_.isEmpty()) { + servers_ = other.servers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServersIsMutable(); + servers_.addAll(other.servers_); + } + onChanged(); + } + } else { + if (!other.servers_.isEmpty()) { + if (serversBuilder_.isEmpty()) { + serversBuilder_.dispose(); + serversBuilder_ = null; + servers_ = other.servers_; + bitField0_ = (bitField0_ & ~0x00000001); + serversBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetServersFieldBuilder() + : null; + } else { + serversBuilder_.addAllMessages(other.servers_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.ftp.v1.Server m = + input.readMessage(com.google.cloud.ftp.v1.Server.parser(), extensionRegistry); + if (serversBuilder_ == null) { + ensureServersIsMutable(); + servers_.add(m); + } else { + serversBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List servers_ = + java.util.Collections.emptyList(); + + private void ensureServersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + servers_ = new java.util.ArrayList(servers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder> + serversBuilder_; + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public java.util.List getServersList() { + if (serversBuilder_ == null) { + return java.util.Collections.unmodifiableList(servers_); + } else { + return serversBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public int getServersCount() { + if (serversBuilder_ == null) { + return servers_.size(); + } else { + return serversBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public com.google.cloud.ftp.v1.Server getServers(int index) { + if (serversBuilder_ == null) { + return servers_.get(index); + } else { + return serversBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder setServers(int index, com.google.cloud.ftp.v1.Server value) { + if (serversBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServersIsMutable(); + servers_.set(index, value); + onChanged(); + } else { + serversBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder setServers(int index, com.google.cloud.ftp.v1.Server.Builder builderForValue) { + if (serversBuilder_ == null) { + ensureServersIsMutable(); + servers_.set(index, builderForValue.build()); + onChanged(); + } else { + serversBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder addServers(com.google.cloud.ftp.v1.Server value) { + if (serversBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServersIsMutable(); + servers_.add(value); + onChanged(); + } else { + serversBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder addServers(int index, com.google.cloud.ftp.v1.Server value) { + if (serversBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServersIsMutable(); + servers_.add(index, value); + onChanged(); + } else { + serversBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder addServers(com.google.cloud.ftp.v1.Server.Builder builderForValue) { + if (serversBuilder_ == null) { + ensureServersIsMutable(); + servers_.add(builderForValue.build()); + onChanged(); + } else { + serversBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder addServers(int index, com.google.cloud.ftp.v1.Server.Builder builderForValue) { + if (serversBuilder_ == null) { + ensureServersIsMutable(); + servers_.add(index, builderForValue.build()); + onChanged(); + } else { + serversBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder addAllServers( + java.lang.Iterable values) { + if (serversBuilder_ == null) { + ensureServersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servers_); + onChanged(); + } else { + serversBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder clearServers() { + if (serversBuilder_ == null) { + servers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serversBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public Builder removeServers(int index) { + if (serversBuilder_ == null) { + ensureServersIsMutable(); + servers_.remove(index); + onChanged(); + } else { + serversBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public com.google.cloud.ftp.v1.Server.Builder getServersBuilder(int index) { + return internalGetServersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public com.google.cloud.ftp.v1.ServerOrBuilder getServersOrBuilder(int index) { + if (serversBuilder_ == null) { + return servers_.get(index); + } else { + return serversBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public java.util.List + getServersOrBuilderList() { + if (serversBuilder_ != null) { + return serversBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(servers_); + } + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public com.google.cloud.ftp.v1.Server.Builder addServersBuilder() { + return internalGetServersFieldBuilder() + .addBuilder(com.google.cloud.ftp.v1.Server.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public com.google.cloud.ftp.v1.Server.Builder addServersBuilder(int index) { + return internalGetServersFieldBuilder() + .addBuilder(index, com.google.cloud.ftp.v1.Server.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Server
+     * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + public java.util.List getServersBuilderList() { + return internalGetServersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder> + internalGetServersFieldBuilder() { + if (serversBuilder_ == null) { + serversBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder>( + servers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + servers_ = null; + } + return serversBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.ListServersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.ListServersResponse) + private static final com.google.cloud.ftp.v1.ListServersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.ListServersResponse(); + } + + public static com.google.cloud.ftp.v1.ListServersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListServersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersResponseOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersResponseOrBuilder.java new file mode 100644 index 000000000000..0d7452e839a4 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListServersResponseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface ListServersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.ListServersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + java.util.List getServersList(); + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + com.google.cloud.ftp.v1.Server getServers(int index); + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + int getServersCount(); + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + java.util.List getServersOrBuilderList(); + + /** + * + * + *
+   * The list of Server
+   * 
+ * + * repeated .google.cloud.ftp.v1.Server servers = 1; + */ + com.google.cloud.ftp.v1.ServerOrBuilder getServersOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersRequest.java new file mode 100644 index 000000000000..78695a196c3d --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersRequest.java @@ -0,0 +1,1438 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for requesting list of Users
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ListUsersRequest} + */ +@com.google.protobuf.Generated +public final class ListUsersRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.ListUsersRequest) + ListUsersRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListUsersRequest"); + } + + // Use ListUsersRequest.newBuilder() to construct. + private ListUsersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListUsersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ListUsersRequest.class, + com.google.cloud.ftp.v1.ListUsersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListUsersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent value for ListUsersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. User may return fewer items than requested.
+   * The maximum value is 1000; The default value is 50 if the field is omitted
+   * (or set to 0).
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the user should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the user should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + + /** + * + * + *
+   * Optional. The view of the User resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. The view of the User resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserView getView() { + com.google.cloud.ftp.v1.UserView result = com.google.cloud.ftp.v1.UserView.forNumber(view_); + return result == null ? com.google.cloud.ftp.v1.UserView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (view_ != com.google.cloud.ftp.v1.UserView.USER_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (view_ != com.google.cloud.ftp.v1.UserView.USER_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.ListUsersRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.ListUsersRequest other = (com.google.cloud.ftp.v1.ListUsersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.ListUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of Users
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ListUsersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.ListUsersRequest) + com.google.cloud.ftp.v1.ListUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ListUsersRequest.class, + com.google.cloud.ftp.v1.ListUsersRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.ListUsersRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListUsersRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.ListUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListUsersRequest build() { + com.google.cloud.ftp.v1.ListUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListUsersRequest buildPartial() { + com.google.cloud.ftp.v1.ListUsersRequest result = + new com.google.cloud.ftp.v1.ListUsersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.ListUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.ListUsersRequest) { + return mergeFrom((com.google.cloud.ftp.v1.ListUsersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.ListUsersRequest other) { + if (other == com.google.cloud.ftp.v1.ListUsersRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListUsersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListUsersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListUsersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListUsersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListUsersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. User may return fewer items than requested.
+     * The maximum value is 1000; The default value is 50 if the field is omitted
+     * (or set to 0).
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. User may return fewer items than requested.
+     * The maximum value is 1000; The default value is 50 if the field is omitted
+     * (or set to 0).
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. User may return fewer items than requested.
+     * The maximum value is 1000; The default value is 50 if the field is omitted
+     * (or set to 0).
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the user should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the user should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the user should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the user should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the user should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserView getView() { + com.google.cloud.ftp.v1.UserView result = com.google.cloud.ftp.v1.UserView.forNumber(view_); + return result == null ? com.google.cloud.ftp.v1.UserView.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.ftp.v1.UserView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the User resource to return.
+     * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.ListUsersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.ListUsersRequest) + private static final com.google.cloud.ftp.v1.ListUsersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.ListUsersRequest(); + } + + public static com.google.cloud.ftp.v1.ListUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUsersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersRequestOrBuilder.java new file mode 100644 index 000000000000..4088a1188f62 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface ListUsersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.ListUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListUsersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListUsersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. User may return fewer items than requested.
+   * The maximum value is 1000; The default value is 50 if the field is omitted
+   * (or set to 0).
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the user should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the user should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. The view of the User resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. The view of the User resource to return.
+   * 
+ * + * .google.cloud.ftp.v1.UserView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The view. + */ + com.google.cloud.ftp.v1.UserView getView(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersResponse.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersResponse.java new file mode 100644 index 000000000000..0b7a50b5a15a --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersResponse.java @@ -0,0 +1,1391 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for response to listing Users
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ListUsersResponse} + */ +@com.google.protobuf.Generated +public final class ListUsersResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.ListUsersResponse) + ListUsersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListUsersResponse"); + } + + // Use ListUsersResponse.newBuilder() to construct. + private ListUsersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListUsersResponse() { + users_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ListUsersResponse.class, + com.google.cloud.ftp.v1.ListUsersResponse.Builder.class); + } + + public static final int USERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List users_; + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + @java.lang.Override + public java.util.List getUsersList() { + return users_; + } + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + @java.lang.Override + public java.util.List getUsersOrBuilderList() { + return users_; + } + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + @java.lang.Override + public int getUsersCount() { + return users_.size(); + } + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.User getUsers(int index) { + return users_.get(index); + } + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserOrBuilder getUsersOrBuilder(int index) { + return users_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the user should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token identifying a page of results the user should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < users_.size(); i++) { + output.writeMessage(1, users_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < users_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, users_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.ListUsersResponse)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.ListUsersResponse other = + (com.google.cloud.ftp.v1.ListUsersResponse) obj; + + if (!getUsersList().equals(other.getUsersList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUsersCount() > 0) { + hash = (37 * hash) + USERS_FIELD_NUMBER; + hash = (53 * hash) + getUsersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.ListUsersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing Users
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ListUsersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.ListUsersResponse) + com.google.cloud.ftp.v1.ListUsersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ListUsersResponse.class, + com.google.cloud.ftp.v1.ListUsersResponse.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.ListUsersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + } else { + users_ = null; + usersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ListUsersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListUsersResponse getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.ListUsersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListUsersResponse build() { + com.google.cloud.ftp.v1.ListUsersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListUsersResponse buildPartial() { + com.google.cloud.ftp.v1.ListUsersResponse result = + new com.google.cloud.ftp.v1.ListUsersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.ftp.v1.ListUsersResponse result) { + if (usersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + users_ = java.util.Collections.unmodifiableList(users_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.users_ = users_; + } else { + result.users_ = usersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.ftp.v1.ListUsersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.ListUsersResponse) { + return mergeFrom((com.google.cloud.ftp.v1.ListUsersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.ListUsersResponse other) { + if (other == com.google.cloud.ftp.v1.ListUsersResponse.getDefaultInstance()) return this; + if (usersBuilder_ == null) { + if (!other.users_.isEmpty()) { + if (users_.isEmpty()) { + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUsersIsMutable(); + users_.addAll(other.users_); + } + onChanged(); + } + } else { + if (!other.users_.isEmpty()) { + if (usersBuilder_.isEmpty()) { + usersBuilder_.dispose(); + usersBuilder_ = null; + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000001); + usersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetUsersFieldBuilder() + : null; + } else { + usersBuilder_.addAllMessages(other.users_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.ftp.v1.User m = + input.readMessage(com.google.cloud.ftp.v1.User.parser(), extensionRegistry); + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(m); + } else { + usersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List users_ = java.util.Collections.emptyList(); + + private void ensureUsersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + users_ = new java.util.ArrayList(users_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder> + usersBuilder_; + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public java.util.List getUsersList() { + if (usersBuilder_ == null) { + return java.util.Collections.unmodifiableList(users_); + } else { + return usersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public int getUsersCount() { + if (usersBuilder_ == null) { + return users_.size(); + } else { + return usersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public com.google.cloud.ftp.v1.User getUsers(int index) { + if (usersBuilder_ == null) { + return users_.get(index); + } else { + return usersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder setUsers(int index, com.google.cloud.ftp.v1.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.set(index, value); + onChanged(); + } else { + usersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder setUsers(int index, com.google.cloud.ftp.v1.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.set(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder addUsers(com.google.cloud.ftp.v1.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(value); + onChanged(); + } else { + usersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder addUsers(int index, com.google.cloud.ftp.v1.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(index, value); + onChanged(); + } else { + usersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder addUsers(com.google.cloud.ftp.v1.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder addUsers(int index, com.google.cloud.ftp.v1.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder addAllUsers(java.lang.Iterable values) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, users_); + onChanged(); + } else { + usersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder clearUsers() { + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + usersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public Builder removeUsers(int index) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.remove(index); + onChanged(); + } else { + usersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public com.google.cloud.ftp.v1.User.Builder getUsersBuilder(int index) { + return internalGetUsersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public com.google.cloud.ftp.v1.UserOrBuilder getUsersOrBuilder(int index) { + if (usersBuilder_ == null) { + return users_.get(index); + } else { + return usersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public java.util.List getUsersOrBuilderList() { + if (usersBuilder_ != null) { + return usersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(users_); + } + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public com.google.cloud.ftp.v1.User.Builder addUsersBuilder() { + return internalGetUsersFieldBuilder() + .addBuilder(com.google.cloud.ftp.v1.User.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public com.google.cloud.ftp.v1.User.Builder addUsersBuilder(int index) { + return internalGetUsersFieldBuilder() + .addBuilder(index, com.google.cloud.ftp.v1.User.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of User
+     * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + public java.util.List getUsersBuilderList() { + return internalGetUsersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder> + internalGetUsersFieldBuilder() { + if (usersBuilder_ == null) { + usersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder>( + users_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + users_ = null; + } + return usersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the user should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the user should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the user should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the user should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the user should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.ListUsersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.ListUsersResponse) + private static final com.google.cloud.ftp.v1.ListUsersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.ListUsersResponse(); + } + + public static com.google.cloud.ftp.v1.ListUsersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUsersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ListUsersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersResponseOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersResponseOrBuilder.java new file mode 100644 index 000000000000..14b8a3b58e6d --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ListUsersResponseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface ListUsersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.ListUsersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + java.util.List getUsersList(); + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + com.google.cloud.ftp.v1.User getUsers(int index); + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + int getUsersCount(); + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + java.util.List getUsersOrBuilderList(); + + /** + * + * + *
+   * The list of User
+   * 
+ * + * repeated .google.cloud.ftp.v1.User users = 1; + */ + com.google.cloud.ftp.v1.UserOrBuilder getUsersOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the user should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the user should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/LocationName.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/LocationName.java new file mode 100644 index 000000000000..55675df7813f --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/LocationName.java @@ -0,0 +1,195 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static @Nullable LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable LocationName> values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/OperationMetadata.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/OperationMetadata.java new file mode 100644 index 000000000000..6f1f0e2a03dd --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/OperationMetadata.java @@ -0,0 +1,1872 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.OperationMetadata.class, + com.google.cloud.ftp.v1.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.OperationMetadata other = + (com.google.cloud.ftp.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.OperationMetadata) + com.google.cloud.ftp.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.OperationMetadata.class, + com.google.cloud.ftp.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.OperationMetadata build() { + com.google.cloud.ftp.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.OperationMetadata buildPartial() { + com.google.cloud.ftp.v1.OperationMetadata result = + new com.google.cloud.ftp.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.ftp.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.OperationMetadata other) { + if (other == com.google.cloud.ftp.v1.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.OperationMetadata) + private static final com.google.cloud.ftp.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.OperationMetadata(); + } + + public static com.google.cloud.ftp.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/OperationMetadataOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..55df699b2adf --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,230 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/Server.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/Server.java new file mode 100644 index 000000000000..59d324e65bbe --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/Server.java @@ -0,0 +1,3755 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message describing Server object
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.Server} + */ +@com.google.protobuf.Generated +public final class Server extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.Server) + ServerOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Server"); + } + + // Use Server.newBuilder() to construct. + private Server(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Server() { + name_ = ""; + displayName_ = ""; + accessType_ = 0; + state_ = 0; + serviceAgent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_Server_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_Server_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.Server.class, com.google.cloud.ftp.v1.Server.Builder.class); + } + + /** + * + * + *
+   * The access type of the Server.
+   * 
+ * + * Protobuf enum {@code google.cloud.ftp.v1.Server.AccessType} + */ + public enum AccessType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ACCESS_TYPE_UNSPECIFIED = 0; + */ + ACCESS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Server is assigned a public IP.
+     * 
+ * + * EXTERNAL = 1; + */ + EXTERNAL(1), + /** + * + * + *
+     * Server is assigned an internal IP.
+     * 
+ * + * INTERNAL = 2; + */ + INTERNAL(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AccessType"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ACCESS_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCESS_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Server is assigned a public IP.
+     * 
+ * + * EXTERNAL = 1; + */ + public static final int EXTERNAL_VALUE = 1; + + /** + * + * + *
+     * Server is assigned an internal IP.
+     * 
+ * + * INTERNAL = 2; + */ + public static final int INTERNAL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AccessType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AccessType forNumber(int value) { + switch (value) { + case 0: + return ACCESS_TYPE_UNSPECIFIED; + case 1: + return EXTERNAL; + case 2: + return INTERNAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AccessType findValueByNumber(int number) { + return AccessType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.ftp.v1.Server.getDescriptor().getEnumTypes().get(0); + } + + private static final AccessType[] VALUES = values(); + + public static AccessType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AccessType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.ftp.v1.Server.AccessType) + } + + /** + * + * + *
+   * Tracks Server status.
+   * 
+ * + * Protobuf enum {@code google.cloud.ftp.v1.Server.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Server is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * Server is starting.
+     * 
+ * + * STARTING = 2; + */ + STARTING(2), + /** + * + * + *
+     * Server is ready to be used.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + * + * + *
+     * Server is stopping.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * Server is stopped.
+     * 
+ * + * STOPPED = 5; + */ + STOPPED(5), + /** + * + * + *
+     * Server is being deleted.
+     * 
+ * + * DELETING = 6; + */ + DELETING(6), + /** + * + * + *
+     * Server is in error state.
+     * 
+ * + * ERROR = 7; + */ + ERROR(7), + /** + * + * + *
+     * Server is being updated.
+     * 
+ * + * UPDATING = 8; + */ + UPDATING(8), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Server is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * Server is starting.
+     * 
+ * + * STARTING = 2; + */ + public static final int STARTING_VALUE = 2; + + /** + * + * + *
+     * Server is ready to be used.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + + /** + * + * + *
+     * Server is stopping.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + + /** + * + * + *
+     * Server is stopped.
+     * 
+ * + * STOPPED = 5; + */ + public static final int STOPPED_VALUE = 5; + + /** + * + * + *
+     * Server is being deleted.
+     * 
+ * + * DELETING = 6; + */ + public static final int DELETING_VALUE = 6; + + /** + * + * + *
+     * Server is in error state.
+     * 
+ * + * ERROR = 7; + */ + public static final int ERROR_VALUE = 7; + + /** + * + * + *
+     * Server is being updated.
+     * 
+ * + * UPDATING = 8; + */ + public static final int UPDATING_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return STARTING; + case 3: + return ACTIVE; + case 4: + return STOPPING; + case 5: + return STOPPED; + case 6: + return DELETING; + case 7: + return ERROR; + case 8: + return UPDATING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.ftp.v1.Server.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.ftp.v1.Server.State) + } + + private int bitField0_; + private int accessConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object accessConfig_; + + public enum AccessConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EXTERNAL_CONFIG(7), + INTERNAL_CONFIG(8), + ACCESSCONFIG_NOT_SET(0); + private final int value; + + private AccessConfigCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AccessConfigCase valueOf(int value) { + return forNumber(value); + } + + public static AccessConfigCase forNumber(int value) { + switch (value) { + case 7: + return EXTERNAL_CONFIG; + case 8: + return INTERNAL_CONFIG; + case 0: + return ACCESSCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AccessConfigCase getAccessConfigCase() { + return AccessConfigCase.forNumber(accessConfigCase_); + } + + public static final int EXTERNAL_CONFIG_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Configuration for external access.
+   * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + * + * @return Whether the externalConfig field is set. + */ + @java.lang.Override + public boolean hasExternalConfig() { + return accessConfigCase_ == 7; + } + + /** + * + * + *
+   * Configuration for external access.
+   * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + * + * @return The externalConfig. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ExternalServerConfig getExternalConfig() { + if (accessConfigCase_ == 7) { + return (com.google.cloud.ftp.v1.ExternalServerConfig) accessConfig_; + } + return com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Configuration for external access.
+   * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ExternalServerConfigOrBuilder getExternalConfigOrBuilder() { + if (accessConfigCase_ == 7) { + return (com.google.cloud.ftp.v1.ExternalServerConfig) accessConfig_; + } + return com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance(); + } + + public static final int INTERNAL_CONFIG_FIELD_NUMBER = 8; + + /** + * + * + *
+   * Configuration for internal access.
+   * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + * + * @return Whether the internalConfig field is set. + */ + @java.lang.Override + public boolean hasInternalConfig() { + return accessConfigCase_ == 8; + } + + /** + * + * + *
+   * Configuration for internal access.
+   * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + * + * @return The internalConfig. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig getInternalConfig() { + if (accessConfigCase_ == 8) { + return (com.google.cloud.ftp.v1.InternalServerConfig) accessConfig_; + } + return com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Configuration for internal access.
+   * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfigOrBuilder getInternalConfigOrBuilder() { + if (accessConfigCase_ == 8) { + return (com.google.cloud.ftp.v1.InternalServerConfig) accessConfig_; + } + return com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_Server_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. Display name of the Server
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Display name of the Server
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCESS_TYPE_FIELD_NUMBER = 6; + private int accessType_ = 0; + + /** + * + * + *
+   * Required. The access type of the Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for accessType. + */ + @java.lang.Override + public int getAccessTypeValue() { + return accessType_; + } + + /** + * + * + *
+   * Required. The access type of the Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accessType. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.Server.AccessType getAccessType() { + com.google.cloud.ftp.v1.Server.AccessType result = + com.google.cloud.ftp.v1.Server.AccessType.forNumber(accessType_); + return result == null ? com.google.cloud.ftp.v1.Server.AccessType.UNRECOGNIZED : result; + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The state of the server.
+   * 
+ * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The state of the server.
+   * 
+ * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.Server.State getState() { + com.google.cloud.ftp.v1.Server.State result = + com.google.cloud.ftp.v1.Server.State.forNumber(state_); + return result == null ? com.google.cloud.ftp.v1.Server.State.UNRECOGNIZED : result; + } + + public static final int GOOGLE_MANAGED_SERVER_CREDENTIAL_FIELD_NUMBER = 10; + private com.google.cloud.ftp.v1.ServerCredential googleManagedServerCredential_; + + /** + * + * + *
+   * Output only. Credentials of the FTP Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the googleManagedServerCredential field is set. + */ + @java.lang.Override + public boolean hasGoogleManagedServerCredential() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Credentials of the FTP Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The googleManagedServerCredential. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerCredential getGoogleManagedServerCredential() { + return googleManagedServerCredential_ == null + ? com.google.cloud.ftp.v1.ServerCredential.getDefaultInstance() + : googleManagedServerCredential_; + } + + /** + * + * + *
+   * Output only. Credentials of the FTP Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerCredentialOrBuilder + getGoogleManagedServerCredentialOrBuilder() { + return googleManagedServerCredential_ == null + ? com.google.cloud.ftp.v1.ServerCredential.getDefaultInstance() + : googleManagedServerCredential_; + } + + public static final int SERVICE_AGENT_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAgent_ = ""; + + /** + * + * + *
+   * Output only. Service agent used to access the customer bucket.
+   * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAgent. + */ + @java.lang.Override + public java.lang.String getServiceAgent() { + java.lang.Object ref = serviceAgent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAgent_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Service agent used to access the customer bucket.
+   * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAgent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAgentBytes() { + java.lang.Object ref = serviceAgent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, displayName_); + } + if (accessType_ + != com.google.cloud.ftp.v1.Server.AccessType.ACCESS_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, accessType_); + } + if (accessConfigCase_ == 7) { + output.writeMessage(7, (com.google.cloud.ftp.v1.ExternalServerConfig) accessConfig_); + } + if (accessConfigCase_ == 8) { + output.writeMessage(8, (com.google.cloud.ftp.v1.InternalServerConfig) accessConfig_); + } + if (state_ != com.google.cloud.ftp.v1.Server.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getGoogleManagedServerCredential()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAgent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, serviceAgent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, displayName_); + } + if (accessType_ + != com.google.cloud.ftp.v1.Server.AccessType.ACCESS_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, accessType_); + } + if (accessConfigCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.ftp.v1.ExternalServerConfig) accessConfig_); + } + if (accessConfigCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.ftp.v1.InternalServerConfig) accessConfig_); + } + if (state_ != com.google.cloud.ftp.v1.Server.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getGoogleManagedServerCredential()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAgent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, serviceAgent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.Server)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.Server other = (com.google.cloud.ftp.v1.Server) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (accessType_ != other.accessType_) return false; + if (state_ != other.state_) return false; + if (hasGoogleManagedServerCredential() != other.hasGoogleManagedServerCredential()) + return false; + if (hasGoogleManagedServerCredential()) { + if (!getGoogleManagedServerCredential().equals(other.getGoogleManagedServerCredential())) + return false; + } + if (!getServiceAgent().equals(other.getServiceAgent())) return false; + if (!getAccessConfigCase().equals(other.getAccessConfigCase())) return false; + switch (accessConfigCase_) { + case 7: + if (!getExternalConfig().equals(other.getExternalConfig())) return false; + break; + case 8: + if (!getInternalConfig().equals(other.getInternalConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + ACCESS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + accessType_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasGoogleManagedServerCredential()) { + hash = (37 * hash) + GOOGLE_MANAGED_SERVER_CREDENTIAL_FIELD_NUMBER; + hash = (53 * hash) + getGoogleManagedServerCredential().hashCode(); + } + hash = (37 * hash) + SERVICE_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAgent().hashCode(); + switch (accessConfigCase_) { + case 7: + hash = (37 * hash) + EXTERNAL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getExternalConfig().hashCode(); + break; + case 8: + hash = (37 * hash) + INTERNAL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInternalConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.Server parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.Server parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.Server parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.Server parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.Server parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.Server parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.Server parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.Server parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.Server parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.Server parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.Server parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.Server parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.Server prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing Server object
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.Server} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.Server) + com.google.cloud.ftp.v1.ServerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_Server_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_Server_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.Server.class, com.google.cloud.ftp.v1.Server.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.Server.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetGoogleManagedServerCredentialFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (externalConfigBuilder_ != null) { + externalConfigBuilder_.clear(); + } + if (internalConfigBuilder_ != null) { + internalConfigBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + displayName_ = ""; + accessType_ = 0; + state_ = 0; + googleManagedServerCredential_ = null; + if (googleManagedServerCredentialBuilder_ != null) { + googleManagedServerCredentialBuilder_.dispose(); + googleManagedServerCredentialBuilder_ = null; + } + serviceAgent_ = ""; + accessConfigCase_ = 0; + accessConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_Server_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.Server getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.Server.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.Server build() { + com.google.cloud.ftp.v1.Server result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.Server buildPartial() { + com.google.cloud.ftp.v1.Server result = new com.google.cloud.ftp.v1.Server(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.Server result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.accessType_ = accessType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.googleManagedServerCredential_ = + googleManagedServerCredentialBuilder_ == null + ? googleManagedServerCredential_ + : googleManagedServerCredentialBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.serviceAgent_ = serviceAgent_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.ftp.v1.Server result) { + result.accessConfigCase_ = accessConfigCase_; + result.accessConfig_ = this.accessConfig_; + if (accessConfigCase_ == 7 && externalConfigBuilder_ != null) { + result.accessConfig_ = externalConfigBuilder_.build(); + } + if (accessConfigCase_ == 8 && internalConfigBuilder_ != null) { + result.accessConfig_ = internalConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.Server) { + return mergeFrom((com.google.cloud.ftp.v1.Server) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.Server other) { + if (other == com.google.cloud.ftp.v1.Server.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000020; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.accessType_ != 0) { + setAccessTypeValue(other.getAccessTypeValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasGoogleManagedServerCredential()) { + mergeGoogleManagedServerCredential(other.getGoogleManagedServerCredential()); + } + if (!other.getServiceAgent().isEmpty()) { + serviceAgent_ = other.serviceAgent_; + bitField0_ |= 0x00000400; + onChanged(); + } + switch (other.getAccessConfigCase()) { + case EXTERNAL_CONFIG: + { + mergeExternalConfig(other.getExternalConfig()); + break; + } + case INTERNAL_CONFIG: + { + mergeInternalConfig(other.getInternalConfig()); + break; + } + case ACCESSCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 48: + { + accessType_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 48 + case 58: + { + input.readMessage( + internalGetExternalConfigFieldBuilder().getBuilder(), extensionRegistry); + accessConfigCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetInternalConfigFieldBuilder().getBuilder(), extensionRegistry); + accessConfigCase_ = 8; + break; + } // case 66 + case 72: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + input.readMessage( + internalGetGoogleManagedServerCredentialFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + serviceAgent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int accessConfigCase_ = 0; + private java.lang.Object accessConfig_; + + public AccessConfigCase getAccessConfigCase() { + return AccessConfigCase.forNumber(accessConfigCase_); + } + + public Builder clearAccessConfig() { + accessConfigCase_ = 0; + accessConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.ExternalServerConfig, + com.google.cloud.ftp.v1.ExternalServerConfig.Builder, + com.google.cloud.ftp.v1.ExternalServerConfigOrBuilder> + externalConfigBuilder_; + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + * + * @return Whether the externalConfig field is set. + */ + @java.lang.Override + public boolean hasExternalConfig() { + return accessConfigCase_ == 7; + } + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + * + * @return The externalConfig. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ExternalServerConfig getExternalConfig() { + if (externalConfigBuilder_ == null) { + if (accessConfigCase_ == 7) { + return (com.google.cloud.ftp.v1.ExternalServerConfig) accessConfig_; + } + return com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance(); + } else { + if (accessConfigCase_ == 7) { + return externalConfigBuilder_.getMessage(); + } + return com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + public Builder setExternalConfig(com.google.cloud.ftp.v1.ExternalServerConfig value) { + if (externalConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessConfig_ = value; + onChanged(); + } else { + externalConfigBuilder_.setMessage(value); + } + accessConfigCase_ = 7; + return this; + } + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + public Builder setExternalConfig( + com.google.cloud.ftp.v1.ExternalServerConfig.Builder builderForValue) { + if (externalConfigBuilder_ == null) { + accessConfig_ = builderForValue.build(); + onChanged(); + } else { + externalConfigBuilder_.setMessage(builderForValue.build()); + } + accessConfigCase_ = 7; + return this; + } + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + public Builder mergeExternalConfig(com.google.cloud.ftp.v1.ExternalServerConfig value) { + if (externalConfigBuilder_ == null) { + if (accessConfigCase_ == 7 + && accessConfig_ != com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance()) { + accessConfig_ = + com.google.cloud.ftp.v1.ExternalServerConfig.newBuilder( + (com.google.cloud.ftp.v1.ExternalServerConfig) accessConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + accessConfig_ = value; + } + onChanged(); + } else { + if (accessConfigCase_ == 7) { + externalConfigBuilder_.mergeFrom(value); + } else { + externalConfigBuilder_.setMessage(value); + } + } + accessConfigCase_ = 7; + return this; + } + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + public Builder clearExternalConfig() { + if (externalConfigBuilder_ == null) { + if (accessConfigCase_ == 7) { + accessConfigCase_ = 0; + accessConfig_ = null; + onChanged(); + } + } else { + if (accessConfigCase_ == 7) { + accessConfigCase_ = 0; + accessConfig_ = null; + } + externalConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + public com.google.cloud.ftp.v1.ExternalServerConfig.Builder getExternalConfigBuilder() { + return internalGetExternalConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ExternalServerConfigOrBuilder getExternalConfigOrBuilder() { + if ((accessConfigCase_ == 7) && (externalConfigBuilder_ != null)) { + return externalConfigBuilder_.getMessageOrBuilder(); + } else { + if (accessConfigCase_ == 7) { + return (com.google.cloud.ftp.v1.ExternalServerConfig) accessConfig_; + } + return com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for external access.
+     * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.ExternalServerConfig, + com.google.cloud.ftp.v1.ExternalServerConfig.Builder, + com.google.cloud.ftp.v1.ExternalServerConfigOrBuilder> + internalGetExternalConfigFieldBuilder() { + if (externalConfigBuilder_ == null) { + if (!(accessConfigCase_ == 7)) { + accessConfig_ = com.google.cloud.ftp.v1.ExternalServerConfig.getDefaultInstance(); + } + externalConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.ExternalServerConfig, + com.google.cloud.ftp.v1.ExternalServerConfig.Builder, + com.google.cloud.ftp.v1.ExternalServerConfigOrBuilder>( + (com.google.cloud.ftp.v1.ExternalServerConfig) accessConfig_, + getParentForChildren(), + isClean()); + accessConfig_ = null; + } + accessConfigCase_ = 7; + onChanged(); + return externalConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig, + com.google.cloud.ftp.v1.InternalServerConfig.Builder, + com.google.cloud.ftp.v1.InternalServerConfigOrBuilder> + internalConfigBuilder_; + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + * + * @return Whether the internalConfig field is set. + */ + @java.lang.Override + public boolean hasInternalConfig() { + return accessConfigCase_ == 8; + } + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + * + * @return The internalConfig. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfig getInternalConfig() { + if (internalConfigBuilder_ == null) { + if (accessConfigCase_ == 8) { + return (com.google.cloud.ftp.v1.InternalServerConfig) accessConfig_; + } + return com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance(); + } else { + if (accessConfigCase_ == 8) { + return internalConfigBuilder_.getMessage(); + } + return com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + public Builder setInternalConfig(com.google.cloud.ftp.v1.InternalServerConfig value) { + if (internalConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessConfig_ = value; + onChanged(); + } else { + internalConfigBuilder_.setMessage(value); + } + accessConfigCase_ = 8; + return this; + } + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + public Builder setInternalConfig( + com.google.cloud.ftp.v1.InternalServerConfig.Builder builderForValue) { + if (internalConfigBuilder_ == null) { + accessConfig_ = builderForValue.build(); + onChanged(); + } else { + internalConfigBuilder_.setMessage(builderForValue.build()); + } + accessConfigCase_ = 8; + return this; + } + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + public Builder mergeInternalConfig(com.google.cloud.ftp.v1.InternalServerConfig value) { + if (internalConfigBuilder_ == null) { + if (accessConfigCase_ == 8 + && accessConfig_ != com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance()) { + accessConfig_ = + com.google.cloud.ftp.v1.InternalServerConfig.newBuilder( + (com.google.cloud.ftp.v1.InternalServerConfig) accessConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + accessConfig_ = value; + } + onChanged(); + } else { + if (accessConfigCase_ == 8) { + internalConfigBuilder_.mergeFrom(value); + } else { + internalConfigBuilder_.setMessage(value); + } + } + accessConfigCase_ = 8; + return this; + } + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + public Builder clearInternalConfig() { + if (internalConfigBuilder_ == null) { + if (accessConfigCase_ == 8) { + accessConfigCase_ = 0; + accessConfig_ = null; + onChanged(); + } + } else { + if (accessConfigCase_ == 8) { + accessConfigCase_ = 0; + accessConfig_ = null; + } + internalConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + public com.google.cloud.ftp.v1.InternalServerConfig.Builder getInternalConfigBuilder() { + return internalGetInternalConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.InternalServerConfigOrBuilder getInternalConfigOrBuilder() { + if ((accessConfigCase_ == 8) && (internalConfigBuilder_ != null)) { + return internalConfigBuilder_.getMessageOrBuilder(); + } else { + if (accessConfigCase_ == 8) { + return (com.google.cloud.ftp.v1.InternalServerConfig) accessConfig_; + } + return com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for internal access.
+     * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig, + com.google.cloud.ftp.v1.InternalServerConfig.Builder, + com.google.cloud.ftp.v1.InternalServerConfigOrBuilder> + internalGetInternalConfigFieldBuilder() { + if (internalConfigBuilder_ == null) { + if (!(accessConfigCase_ == 8)) { + accessConfig_ = com.google.cloud.ftp.v1.InternalServerConfig.getDefaultInstance(); + } + internalConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.InternalServerConfig, + com.google.cloud.ftp.v1.InternalServerConfig.Builder, + com.google.cloud.ftp.v1.InternalServerConfigOrBuilder>( + (com.google.cloud.ftp.v1.InternalServerConfig) accessConfig_, + getParentForChildren(), + isClean()); + accessConfig_ = null; + } + accessConfigCase_ = 8; + onChanged(); + return internalConfigBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000020; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. Display name of the Server
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Display name of the Server
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Display name of the Server
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Display name of the Server
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Display name of the Server
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int accessType_ = 0; + + /** + * + * + *
+     * Required. The access type of the Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for accessType. + */ + @java.lang.Override + public int getAccessTypeValue() { + return accessType_; + } + + /** + * + * + *
+     * Required. The access type of the Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for accessType to set. + * @return This builder for chaining. + */ + public Builder setAccessTypeValue(int value) { + accessType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The access type of the Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accessType. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.Server.AccessType getAccessType() { + com.google.cloud.ftp.v1.Server.AccessType result = + com.google.cloud.ftp.v1.Server.AccessType.forNumber(accessType_); + return result == null ? com.google.cloud.ftp.v1.Server.AccessType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. The access type of the Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The accessType to set. + * @return This builder for chaining. + */ + public Builder setAccessType(com.google.cloud.ftp.v1.Server.AccessType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + accessType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The access type of the Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearAccessType() { + bitField0_ = (bitField0_ & ~0x00000080); + accessType_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The state of the server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The state of the server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.Server.State getState() { + com.google.cloud.ftp.v1.Server.State result = + com.google.cloud.ftp.v1.Server.State.forNumber(state_); + return result == null ? com.google.cloud.ftp.v1.Server.State.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Output only. The state of the server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.ftp.v1.Server.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the server.
+     * 
+ * + * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.ftp.v1.ServerCredential googleManagedServerCredential_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.ServerCredential, + com.google.cloud.ftp.v1.ServerCredential.Builder, + com.google.cloud.ftp.v1.ServerCredentialOrBuilder> + googleManagedServerCredentialBuilder_; + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the googleManagedServerCredential field is set. + */ + public boolean hasGoogleManagedServerCredential() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The googleManagedServerCredential. + */ + public com.google.cloud.ftp.v1.ServerCredential getGoogleManagedServerCredential() { + if (googleManagedServerCredentialBuilder_ == null) { + return googleManagedServerCredential_ == null + ? com.google.cloud.ftp.v1.ServerCredential.getDefaultInstance() + : googleManagedServerCredential_; + } else { + return googleManagedServerCredentialBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGoogleManagedServerCredential( + com.google.cloud.ftp.v1.ServerCredential value) { + if (googleManagedServerCredentialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + googleManagedServerCredential_ = value; + } else { + googleManagedServerCredentialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGoogleManagedServerCredential( + com.google.cloud.ftp.v1.ServerCredential.Builder builderForValue) { + if (googleManagedServerCredentialBuilder_ == null) { + googleManagedServerCredential_ = builderForValue.build(); + } else { + googleManagedServerCredentialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeGoogleManagedServerCredential( + com.google.cloud.ftp.v1.ServerCredential value) { + if (googleManagedServerCredentialBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && googleManagedServerCredential_ != null + && googleManagedServerCredential_ + != com.google.cloud.ftp.v1.ServerCredential.getDefaultInstance()) { + getGoogleManagedServerCredentialBuilder().mergeFrom(value); + } else { + googleManagedServerCredential_ = value; + } + } else { + googleManagedServerCredentialBuilder_.mergeFrom(value); + } + if (googleManagedServerCredential_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGoogleManagedServerCredential() { + bitField0_ = (bitField0_ & ~0x00000200); + googleManagedServerCredential_ = null; + if (googleManagedServerCredentialBuilder_ != null) { + googleManagedServerCredentialBuilder_.dispose(); + googleManagedServerCredentialBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.ftp.v1.ServerCredential.Builder + getGoogleManagedServerCredentialBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetGoogleManagedServerCredentialFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.ftp.v1.ServerCredentialOrBuilder + getGoogleManagedServerCredentialOrBuilder() { + if (googleManagedServerCredentialBuilder_ != null) { + return googleManagedServerCredentialBuilder_.getMessageOrBuilder(); + } else { + return googleManagedServerCredential_ == null + ? com.google.cloud.ftp.v1.ServerCredential.getDefaultInstance() + : googleManagedServerCredential_; + } + } + + /** + * + * + *
+     * Output only. Credentials of the FTP Server.
+     * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.ServerCredential, + com.google.cloud.ftp.v1.ServerCredential.Builder, + com.google.cloud.ftp.v1.ServerCredentialOrBuilder> + internalGetGoogleManagedServerCredentialFieldBuilder() { + if (googleManagedServerCredentialBuilder_ == null) { + googleManagedServerCredentialBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.ServerCredential, + com.google.cloud.ftp.v1.ServerCredential.Builder, + com.google.cloud.ftp.v1.ServerCredentialOrBuilder>( + getGoogleManagedServerCredential(), getParentForChildren(), isClean()); + googleManagedServerCredential_ = null; + } + return googleManagedServerCredentialBuilder_; + } + + private java.lang.Object serviceAgent_ = ""; + + /** + * + * + *
+     * Output only. Service agent used to access the customer bucket.
+     * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAgent. + */ + public java.lang.String getServiceAgent() { + java.lang.Object ref = serviceAgent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAgent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Service agent used to access the customer bucket.
+     * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAgent. + */ + public com.google.protobuf.ByteString getServiceAgentBytes() { + java.lang.Object ref = serviceAgent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Service agent used to access the customer bucket.
+     * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceAgent to set. + * @return This builder for chaining. + */ + public Builder setServiceAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAgent_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Service agent used to access the customer bucket.
+     * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAgent() { + serviceAgent_ = getDefaultInstance().getServiceAgent(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Service agent used to access the customer bucket.
+     * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceAgent to set. + * @return This builder for chaining. + */ + public Builder setServiceAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAgent_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.Server) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.Server) + private static final com.google.cloud.ftp.v1.Server DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.Server(); + } + + public static com.google.cloud.ftp.v1.Server getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Server parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.Server getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerCredential.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerCredential.java new file mode 100644 index 000000000000..63a7483e80c3 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerCredential.java @@ -0,0 +1,811 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Represents credentials of an FTP Server.
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ServerCredential} + */ +@com.google.protobuf.Generated +public final class ServerCredential extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.ServerCredential) + ServerCredentialOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ServerCredential"); + } + + // Use ServerCredential.newBuilder() to construct. + private ServerCredential(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ServerCredential() { + fingerprint_ = ""; + asymmetricAlgorithm_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ServerCredential_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ServerCredential_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ServerCredential.class, + com.google.cloud.ftp.v1.ServerCredential.Builder.class); + } + + public static final int FINGERPRINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fingerprint_ = ""; + + /** + * + * + *
+   * Output only. The fingerprint is a hash of the public key, and is displayed
+   * when clients access the server for the first time to verify the server's
+   * identity.
+   * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The fingerprint. + */ + @java.lang.Override + public java.lang.String getFingerprint() { + java.lang.Object ref = fingerprint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fingerprint_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The fingerprint is a hash of the public key, and is displayed
+   * when clients access the server for the first time to verify the server's
+   * identity.
+   * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for fingerprint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFingerprintBytes() { + java.lang.Object ref = fingerprint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fingerprint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASYMMETRIC_ALGORITHM_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object asymmetricAlgorithm_ = ""; + + /** + * + * + *
+   * Output only. Asymmetric algorithm used by the public key.
+   * Possible values (can be expanded in future):
+   * - ssh-ed25519
+   * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The asymmetricAlgorithm. + */ + @java.lang.Override + public java.lang.String getAsymmetricAlgorithm() { + java.lang.Object ref = asymmetricAlgorithm_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asymmetricAlgorithm_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Asymmetric algorithm used by the public key.
+   * Possible values (can be expanded in future):
+   * - ssh-ed25519
+   * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for asymmetricAlgorithm. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAsymmetricAlgorithmBytes() { + java.lang.Object ref = asymmetricAlgorithm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + asymmetricAlgorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fingerprint_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, fingerprint_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(asymmetricAlgorithm_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, asymmetricAlgorithm_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fingerprint_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fingerprint_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(asymmetricAlgorithm_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, asymmetricAlgorithm_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.ServerCredential)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.ServerCredential other = (com.google.cloud.ftp.v1.ServerCredential) obj; + + if (!getFingerprint().equals(other.getFingerprint())) return false; + if (!getAsymmetricAlgorithm().equals(other.getAsymmetricAlgorithm())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; + hash = (53 * hash) + getFingerprint().hashCode(); + hash = (37 * hash) + ASYMMETRIC_ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + getAsymmetricAlgorithm().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.ServerCredential parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.ServerCredential prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents credentials of an FTP Server.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.ServerCredential} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.ServerCredential) + com.google.cloud.ftp.v1.ServerCredentialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ServerCredential_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ServerCredential_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.ServerCredential.class, + com.google.cloud.ftp.v1.ServerCredential.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.ServerCredential.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fingerprint_ = ""; + asymmetricAlgorithm_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_ServerCredential_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ServerCredential getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.ServerCredential.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ServerCredential build() { + com.google.cloud.ftp.v1.ServerCredential result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ServerCredential buildPartial() { + com.google.cloud.ftp.v1.ServerCredential result = + new com.google.cloud.ftp.v1.ServerCredential(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.ServerCredential result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fingerprint_ = fingerprint_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.asymmetricAlgorithm_ = asymmetricAlgorithm_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.ServerCredential) { + return mergeFrom((com.google.cloud.ftp.v1.ServerCredential) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.ServerCredential other) { + if (other == com.google.cloud.ftp.v1.ServerCredential.getDefaultInstance()) return this; + if (!other.getFingerprint().isEmpty()) { + fingerprint_ = other.fingerprint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAsymmetricAlgorithm().isEmpty()) { + asymmetricAlgorithm_ = other.asymmetricAlgorithm_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + asymmetricAlgorithm_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fingerprint_ = ""; + + /** + * + * + *
+     * Output only. The fingerprint is a hash of the public key, and is displayed
+     * when clients access the server for the first time to verify the server's
+     * identity.
+     * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The fingerprint. + */ + public java.lang.String getFingerprint() { + java.lang.Object ref = fingerprint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fingerprint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The fingerprint is a hash of the public key, and is displayed
+     * when clients access the server for the first time to verify the server's
+     * identity.
+     * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for fingerprint. + */ + public com.google.protobuf.ByteString getFingerprintBytes() { + java.lang.Object ref = fingerprint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fingerprint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The fingerprint is a hash of the public key, and is displayed
+     * when clients access the server for the first time to verify the server's
+     * identity.
+     * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The fingerprint to set. + * @return This builder for chaining. + */ + public Builder setFingerprint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fingerprint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The fingerprint is a hash of the public key, and is displayed
+     * when clients access the server for the first time to verify the server's
+     * identity.
+     * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFingerprint() { + fingerprint_ = getDefaultInstance().getFingerprint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The fingerprint is a hash of the public key, and is displayed
+     * when clients access the server for the first time to verify the server's
+     * identity.
+     * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for fingerprint to set. + * @return This builder for chaining. + */ + public Builder setFingerprintBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fingerprint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object asymmetricAlgorithm_ = ""; + + /** + * + * + *
+     * Output only. Asymmetric algorithm used by the public key.
+     * Possible values (can be expanded in future):
+     * - ssh-ed25519
+     * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The asymmetricAlgorithm. + */ + public java.lang.String getAsymmetricAlgorithm() { + java.lang.Object ref = asymmetricAlgorithm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asymmetricAlgorithm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Asymmetric algorithm used by the public key.
+     * Possible values (can be expanded in future):
+     * - ssh-ed25519
+     * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for asymmetricAlgorithm. + */ + public com.google.protobuf.ByteString getAsymmetricAlgorithmBytes() { + java.lang.Object ref = asymmetricAlgorithm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + asymmetricAlgorithm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Asymmetric algorithm used by the public key.
+     * Possible values (can be expanded in future):
+     * - ssh-ed25519
+     * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The asymmetricAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setAsymmetricAlgorithm(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + asymmetricAlgorithm_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Asymmetric algorithm used by the public key.
+     * Possible values (can be expanded in future):
+     * - ssh-ed25519
+     * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAsymmetricAlgorithm() { + asymmetricAlgorithm_ = getDefaultInstance().getAsymmetricAlgorithm(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Asymmetric algorithm used by the public key.
+     * Possible values (can be expanded in future):
+     * - ssh-ed25519
+     * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for asymmetricAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setAsymmetricAlgorithmBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + asymmetricAlgorithm_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.ServerCredential) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.ServerCredential) + private static final com.google.cloud.ftp.v1.ServerCredential DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.ServerCredential(); + } + + public static com.google.cloud.ftp.v1.ServerCredential getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServerCredential parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.ServerCredential getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerCredentialOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerCredentialOrBuilder.java new file mode 100644 index 000000000000..b7a423d92850 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerCredentialOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface ServerCredentialOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.ServerCredential) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The fingerprint is a hash of the public key, and is displayed
+   * when clients access the server for the first time to verify the server's
+   * identity.
+   * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The fingerprint. + */ + java.lang.String getFingerprint(); + + /** + * + * + *
+   * Output only. The fingerprint is a hash of the public key, and is displayed
+   * when clients access the server for the first time to verify the server's
+   * identity.
+   * 
+ * + * string fingerprint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for fingerprint. + */ + com.google.protobuf.ByteString getFingerprintBytes(); + + /** + * + * + *
+   * Output only. Asymmetric algorithm used by the public key.
+   * Possible values (can be expanded in future):
+   * - ssh-ed25519
+   * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The asymmetricAlgorithm. + */ + java.lang.String getAsymmetricAlgorithm(); + + /** + * + * + *
+   * Output only. Asymmetric algorithm used by the public key.
+   * Possible values (can be expanded in future):
+   * - ssh-ed25519
+   * 
+ * + * string asymmetric_algorithm = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for asymmetricAlgorithm. + */ + com.google.protobuf.ByteString getAsymmetricAlgorithmBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerName.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerName.java new file mode 100644 index 000000000000..c1295a86a726 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerName.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class ServerName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SERVER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/servers/{server}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String server; + + @Deprecated + protected ServerName() { + project = null; + location = null; + server = null; + } + + private ServerName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + server = Preconditions.checkNotNull(builder.getServer()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getServer() { + return server; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ServerName of(String project, String location, String server) { + return newBuilder().setProject(project).setLocation(location).setServer(server).build(); + } + + public static String format(String project, String location, String server) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setServer(server) + .build() + .toString(); + } + + public static @Nullable ServerName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SERVER.validatedMatch( + formattedString, "ServerName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("server")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable ServerName> values) { + List list = new ArrayList<>(values.size()); + for (ServerName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SERVER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (server != null) { + fieldMapBuilder.put("server", server); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SERVER.instantiate( + "project", project, "location", location, "server", server); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ServerName that = ((ServerName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.server, that.server); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(server); + return h; + } + + /** Builder for projects/{project}/locations/{location}/servers/{server}. */ + public static class Builder { + private String project; + private String location; + private String server; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getServer() { + return server; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setServer(String server) { + this.server = server; + return this; + } + + private Builder(ServerName serverName) { + this.project = serverName.project; + this.location = serverName.location; + this.server = serverName.server; + } + + public ServerName build() { + return new ServerName(this); + } + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerOrBuilder.java new file mode 100644 index 000000000000..af6a23e89834 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerOrBuilder.java @@ -0,0 +1,426 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface ServerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.Server) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configuration for external access.
+   * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + * + * @return Whether the externalConfig field is set. + */ + boolean hasExternalConfig(); + + /** + * + * + *
+   * Configuration for external access.
+   * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + * + * @return The externalConfig. + */ + com.google.cloud.ftp.v1.ExternalServerConfig getExternalConfig(); + + /** + * + * + *
+   * Configuration for external access.
+   * 
+ * + * .google.cloud.ftp.v1.ExternalServerConfig external_config = 7; + */ + com.google.cloud.ftp.v1.ExternalServerConfigOrBuilder getExternalConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for internal access.
+   * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + * + * @return Whether the internalConfig field is set. + */ + boolean hasInternalConfig(); + + /** + * + * + *
+   * Configuration for internal access.
+   * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + * + * @return The internalConfig. + */ + com.google.cloud.ftp.v1.InternalServerConfig getInternalConfig(); + + /** + * + * + *
+   * Configuration for internal access.
+   * 
+ * + * .google.cloud.ftp.v1.InternalServerConfig internal_config = 8; + */ + com.google.cloud.ftp.v1.InternalServerConfigOrBuilder getInternalConfigOrBuilder(); + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Display name of the Server
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. Display name of the Server
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. The access type of the Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for accessType. + */ + int getAccessTypeValue(); + + /** + * + * + *
+   * Required. The access type of the Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.Server.AccessType access_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accessType. + */ + com.google.cloud.ftp.v1.Server.AccessType getAccessType(); + + /** + * + * + *
+   * Output only. The state of the server.
+   * 
+ * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The state of the server.
+   * 
+ * + * .google.cloud.ftp.v1.Server.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.ftp.v1.Server.State getState(); + + /** + * + * + *
+   * Output only. Credentials of the FTP Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the googleManagedServerCredential field is set. + */ + boolean hasGoogleManagedServerCredential(); + + /** + * + * + *
+   * Output only. Credentials of the FTP Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The googleManagedServerCredential. + */ + com.google.cloud.ftp.v1.ServerCredential getGoogleManagedServerCredential(); + + /** + * + * + *
+   * Output only. Credentials of the FTP Server.
+   * 
+ * + * + * .google.cloud.ftp.v1.ServerCredential google_managed_server_credential = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.ftp.v1.ServerCredentialOrBuilder getGoogleManagedServerCredentialOrBuilder(); + + /** + * + * + *
+   * Output only. Service agent used to access the customer bucket.
+   * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAgent. + */ + java.lang.String getServiceAgent(); + + /** + * + * + *
+   * Output only. Service agent used to access the customer bucket.
+   * 
+ * + * string service_agent = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAgent. + */ + com.google.protobuf.ByteString getServiceAgentBytes(); + + com.google.cloud.ftp.v1.Server.AccessConfigCase getAccessConfigCase(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerView.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerView.java new file mode 100644 index 000000000000..f8ec1bfe5874 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServerView.java @@ -0,0 +1,193 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * View for Server resource.
+ * 
+ * + * Protobuf enum {@code google.cloud.ftp.v1.ServerView} + */ +@com.google.protobuf.Generated +public enum ServerView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value. Equivalent to SERVER_VIEW_BASIC.
+   * 
+ * + * SERVER_VIEW_UNSPECIFIED = 0; + */ + SERVER_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Basic view. Excludes heavy configurations (internal_config,
+   * external_config, google_managed_server_credential).
+   * 
+ * + * SERVER_VIEW_BASIC = 1; + */ + SERVER_VIEW_BASIC(1), + /** + * + * + *
+   * Full view. Includes all fields.
+   * 
+ * + * SERVER_VIEW_FULL = 2; + */ + SERVER_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ServerView"); + } + + /** + * + * + *
+   * Default value. Equivalent to SERVER_VIEW_BASIC.
+   * 
+ * + * SERVER_VIEW_UNSPECIFIED = 0; + */ + public static final int SERVER_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Basic view. Excludes heavy configurations (internal_config,
+   * external_config, google_managed_server_credential).
+   * 
+ * + * SERVER_VIEW_BASIC = 1; + */ + public static final int SERVER_VIEW_BASIC_VALUE = 1; + + /** + * + * + *
+   * Full view. Includes all fields.
+   * 
+ * + * SERVER_VIEW_FULL = 2; + */ + public static final int SERVER_VIEW_FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ServerView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ServerView forNumber(int value) { + switch (value) { + case 0: + return SERVER_VIEW_UNSPECIFIED; + case 1: + return SERVER_VIEW_BASIC; + case 2: + return SERVER_VIEW_FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ServerView findValueByNumber(int number) { + return ServerView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ServerView[] VALUES = values(); + + public static ServerView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ServerView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.ftp.v1.ServerView) +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServiceProto.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServiceProto.java new file mode 100644 index 000000000000..e0101d5d90e1 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/ServiceProto.java @@ -0,0 +1,699 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public final class ServiceProto extends com.google.protobuf.GeneratedFile { + private ServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_ExternalServerConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_ExternalServerConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_InternalServerConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_ServerCredential_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_ServerCredential_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_Server_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_Server_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_Server_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_Server_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_ListServersRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_ListServersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_ListServersResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_ListServersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_GetServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_GetServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_CreateServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_CreateServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_UpdateServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_UpdateServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_DeleteServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_DeleteServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_User_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_User_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_User_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_User_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_ListUsersRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_ListUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_ListUsersResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_ListUsersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_GetUserRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_GetUserRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_CreateUserRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_CreateUserRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_UpdateUserRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_UpdateUserRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_DeleteUserRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_DeleteUserRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_StartServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_StartServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_StopServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_StopServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_UserCredential_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_UserCredential_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_ftp_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_ftp_v1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "!google/cloud/ftp/v1/service.proto\022\023goo" + + "gle.cloud.ftp.v1\032\034google/api/annotations" + + ".proto\032\027google/api/client.proto\032\037google/" + + "api/field_behavior.proto\032\033google/api/fie" + + "ld_info.proto\032\031google/api/resource.proto" + + "\032#google/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"Y\n" + + "\024ExternalServerConfig\022\037\n" + + "\n" + + "ip_address\030\001 \001(\tB\013\340A\003\342\214\317\327\010\002\010\004\022 \n" + + "\023allowed_cidr_blocks\030\002 \003(\tB\003\340A\001\"\202\006\n" + + "\024InternalServerConfig\022L\n" + + "\022service_attachment\030\001 \001(\tB0\340A\003\372A*\n" + + "(compute.googleapis.com/ServiceAttachment\022\\\n" + + "\024consumer_accept_list\030\002 \003(\01329." + + "google.cloud.ftp.v1.InternalServerConfig.AllowedConsumerB\003\340A\002\022[\n" + + "\024consumer_reject_list\030\003" + + " \003(\01328.google.cloud.ftp.v1.InternalServerConfig.DeniedConsumerB\003\340A\001\022Q\n\r" + + "psc_endpoints\030\004 \003(\01325.google.cloud.ftp.v1." + + "InternalServerConfig.PscEndpointB\003\340A\003\032\206\001\n" + + "\017AllowedConsumer\022C\n" + + "\007project\030\001 \001(\tB0\372A-\n" + + "+cloudresourcemanager.googleapis.com/ProjectH\000\022\035\n" + + "\020connection_limit\030\002 \001(\003B\003\340A\002B\017\n" + + "\r" + + "consumer_type\032f\n" + + "\016DeniedConsumer\022C\n" + + "\007project\030\001 \001(\tB0\372A-\n" + + "+cloudresourcemanager.googleapis.com/ProjectH\000B\017\n\r" + + "consumer_type\032\234\001\n" + + "\013PscEndpoint\022?\n" + + "\010endpoint\030\001 \001(\tB-\340A\003\372A\'\n" + + "%compute.googleapis.com/ForwardingRule\0227\n" + + "\007network\030\002 \001(\tB&\340A\003\372A \n" + + "\036compute.googleapis.com/Network\022\023\n" + + "\006status\030\003 \001(\tB\003\340A\003\"O\n" + + "\020ServerCredential\022\030\n" + + "\013fingerprint\030\001 \001(\tB\003\340A\003\022!\n" + + "\024asymmetric_algorithm\030\002 \001(\tB\003\340A\003\"\324\007\n" + + "\006Server\022D\n" + + "\017external_config\030\007 \001(\0132).goo" + + "gle.cloud.ftp.v1.ExternalServerConfigH\000\022D\n" + + "\017internal_config\030\010" + + " \001(\0132).google.cloud.ftp.v1.InternalServerConfigH\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022<\n" + + "\006labels\030\004" + + " \003(\0132\'.google.cloud.ftp.v1.Server.LabelsEntryB\003\340A\001\022\031\n" + + "\014display_name\030\005 \001(\tB\003\340A\001\022@\n" + + "\013access_type\030\006" + + " \001(\0162&.google.cloud.ftp.v1.Server.AccessTypeB\003\340A\002\0225\n" + + "\005state\030\t \001(\0162!.google.cloud.ftp.v1.Server.StateB\003\340A\003\022T\n" + + " google_managed_server_credential\030\n" + + " \001(\0132%.google.cloud.ftp.v1.ServerCredentialB\003\340A\003\022\032\n\r" + + "service_agent\030\013 \001(\tB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"E\n\n" + + "AccessType\022\033\n" + + "\027ACCESS_TYPE_UNSPECIFIED\020\000\022\014\n" + + "\010EXTERNAL\020\001\022\014\n" + + "\010INTERNAL\020\002\"\210\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\014\n" + + "\010STARTING\020\002\022\n\n" + + "\006ACTIVE\020\003\022\014\n" + + "\010STOPPING\020\004\022\013\n" + + "\007STOPPED\020\005\022\014\n" + + "\010DELETING\020\006\022\t\n" + + "\005ERROR\020\007\022\014\n" + + "\010UPDATING\020\010:i\352Af\n" + + "\031ftp.googleapis.com/Server\0228projects/{project}/locations/" + + "{location}/servers/{server}*\007servers2\006serverB\017\n\r" + + "access_config\"\330\001\n" + + "\022ListServersRequest\0221\n" + + "\006parent\030\001 \001(" + + "\tB!\340A\002\372A\033\022\031ftp.googleapis.com/Server\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\0222\n" + + "\004view\030\006 \001(\0162\037.google.cloud.ftp.v1.ServerViewB\003\340A\001\"v\n" + + "\023ListServersResponse\022,\n" + + "\007servers\030\001 \003(\0132\033.google.cloud.ftp.v1.Server\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\030\n" + + "\013unreachable\030\003 \003(\tB\003\340A\006\"w\n" + + "\020GetServerRequest\022/\n" + + "\004name\030\001 \001(\tB!\340A\002\372A\033\n" + + "\031ftp.googleapis.com/Server\0222\n" + + "\004view\030\002 " + + "\001(\0162\037.google.cloud.ftp.v1.ServerViewB\003\340A\001\"\263\001\n" + + "\023CreateServerRequest\0221\n" + + "\006parent\030\001 \001(" + + "\tB!\340A\002\372A\033\022\031ftp.googleapis.com/Server\022\026\n" + + "\tserver_id\030\002 \001(\tB\003\340A\002\0220\n" + + "\006server\030\003 \001(\0132\033.google.cloud.ftp.v1.ServerB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\236\001\n" + + "\023UpdateServerRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\0220\n" + + "\006server\030\002 \001(\0132\033.google.cloud.ftp.v1.ServerB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"F\n" + + "\023DeleteServerRequest\022/\n" + + "\004name\030\001 \001(\tB!\340A\002\372A\033\n" + + "\031ftp.googleapis.com/Server\"\375\001\n" + + "\027StorageDirectoryMapping\022\023\n" + + "\006bucket\030\001 \001(\tB\003\340A\002\022\032\n\r" + + "bucket_prefix\030\002 \001(\tB\003\340A\001\022\026\n" + + "\tdirectory\030\003 \001(\tB\003\340A\002\022P\n" + + "\n" + + "permission\030\004 \001(\01627.google.cloud.ftp.v1." + + "StorageDirectoryMapping.PermissionB\003\340A\002\"G\n\n" + + "Permission\022\032\n" + + "\026PERMISSION_UNSPECIFIED\020\000\022\r\n" + + "\tREAD_ONLY\020\001\022\016\n\n" + + "READ_WRITE\020\002\"\321\005\n" + + "\004User\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022:\n" + + "\006labels\030\004" + + " \003(\0132%.google.cloud.ftp.v1.User.LabelsEntryB\003\340A\001\022\025\n" + + "\010username\030\005 \001(\tB\003\340A\003\022%\n" + + "\030customer_service_account\030\007 \001(\tB\003\340A\002\0223\n" + + "\005state\030\010 \001(\0162\037.google.cloud.ftp.v1.User.StateB\003\340A\003\022B\n" + + "\020user_credentials\030\t" + + " \003(\0132#.google.cloud.ftp.v1.UserCredentialB\003\340A\002\022U\n" + + "\032storage_directory_mappings\030\n" + + " \003(\0132,.google.cloud.ftp.v1.StorageDirectoryMappingB\003\340A\002\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"_\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\t\n" + + "\005ERROR\020\003\022\014\n" + + "\010UPDATING\020\004\022\014\n" + + "\010DELETING\020\005:p\352Am\n" + + "\027ftp.googleapis.com/User\022Eprojec" + + "ts/{project}/locations/{location}/servers/{server}/users/{user}*\005users2\004user\"\322\001\n" + + "\020ListUsersRequest\022/\n" + + "\006parent\030\001 \001(" + + "\tB\037\340A\002\372A\031\022\027ftp.googleapis.com/User\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\0220\n" + + "\004view\030\006 \001(\0162\035.google.cloud.ftp.v1.UserViewB\003\340A\001\"p\n" + + "\021ListUsersResponse\022(\n" + + "\005users\030\001 \003(\0132\031.google.cloud.ftp.v1.User\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\030\n" + + "\013unreachable\030\003 \003(\tB\003\340A\006\"q\n" + + "\016GetUserRequest\022-\n" + + "\004name\030\001 \001(\tB\037\340A\002\372A\031\n" + + "\027ftp.googleapis.com/User\0220\n" + + "\004view\030\002 \001(\0162\035.google.cloud.ftp.v1.UserViewB\003\340A\001\"\251\001\n" + + "\021CreateUserRequest\022/\n" + + "\006parent\030\001 \001(" + + "\tB\037\340A\002\372A\031\022\027ftp.googleapis.com/User\022\024\n" + + "\007user_id\030\002 \001(\tB\003\340A\002\022,\n" + + "\004user\030\003 \001(\0132\031.google.cloud.ftp.v1.UserB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"w\n" + + "\021UpdateUserRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022,\n" + + "\004user\030\002 \001(\0132\031.google.cloud.ftp.v1.UserB\003\340A\002\"V\n" + + "\021DeleteUserRequest\022-\n" + + "\004name\030\001 \001(\tB\037\340A\002\372A\031\n" + + "\027ftp.googleapis.com/User\022\022\n" + + "\005force\030\003 \001(\010B\003\340A\001\"E\n" + + "\022StartServerRequest\022/\n" + + "\004name\030\001 \001(\tB!\340A\002\372A\033\n" + + "\031ftp.googleapis.com/Server\"D\n" + + "\021StopServerRequest\022/\n" + + "\004name\030\001 \001(\tB!\340A\002\372A\033\n" + + "\031ftp.googleapis.com/Server\"\306\001\n" + + "\016UserCredential\022\034\n" + + "\017credential_name\030\001 \001(\tB\003\340A\002\022F\n" + + "\017credential_type\030\002 \001(\0162(.goo" + + "gle.cloud.ftp.v1.UserCredential.TypeB\003\340A\002\022 \n" + + "\023ssh_public_key_body\030\003 \001(\tB\003\340A\001\",\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\016\n\n" + + "PUBLIC_KEY\020\001\"\200\002\n" + + "\021OperationMetadata\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023\n" + + "\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n" + + "\016status_message\030\005 \001(\tB\003\340A\003\022#\n" + + "\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n" + + "\013api_version\030\007 \001(\tB\003\340A\003*V\n\n" + + "ServerView\022\033\n" + + "\027SERVER_VIEW_UNSPECIFIED\020\000\022\025\n" + + "\021SERVER_VIEW_BASIC\020\001\022\024\n" + + "\020SERVER_VIEW_FULL\020\002*N\n" + + "\010UserView\022\031\n" + + "\025USER_VIEW_UNSPECIFIED\020\000\022\023\n" + + "\017USER_VIEW_BASIC\020\001\022\022\n" + + "\016USER_VIEW_FULL\020\0022\351\021\n" + + "\010CloudFtp\022\236\001\n" + + "\013ListServers\022\'.google.cloud.ftp.v1.ListServersRequest\032(.google.cloud.ftp.v1" + + ".ListServersResponse\"<\332A\006parent\202\323\344\223\002-\022+/" + + "v1/{parent=projects/*/locations/*}/servers\022\213\001\n" + + "\tGetServer\022%.google.cloud.ftp.v1.GetServerRequest\032\033.google.cloud.ftp.v1.Se" + + "rver\":\332A\004name\202\323\344\223\002-\022+/v1/{name=projects/*/locations/*/servers/*}\022\314\001\n" + + "\014CreateServe" + + "r\022(.google.cloud.ftp.v1.CreateServerRequest\032\035.google.longrunning.Operation\"s\312A\033\n" + + "\006Server\022\021OperationMetadata\332A\027parent,serv" + + "er,server_id\202\323\344\223\0025\"+/v1/{parent=projects/*/locations/*}/servers:\006server\022\316\001\n" + + "\014UpdateServer\022(.google.cloud.ftp.v1.UpdateSer" + + "verRequest\032\035.google.longrunning.Operation\"u\312A\033\n" + + "\006Server\022\021OperationMetadata\332A\022serv" + + "er,update_mask\202\323\344\223\002<22/v1/{server.name=p" + + "rojects/*/locations/*/servers/*}:\006server\022\300\001\n" + + "\014DeleteServer\022(.google.cloud.ftp.v1." + + "DeleteServerRequest\032\035.google.longrunning.Operation\"g\312A*\n" + + "\025google.protobuf.Empty\022\021" + + "OperationMetadata\332A\004name\202\323\344\223\002-*+/v1/{name=projects/*/locations/*/servers/*}\022\240\001\n" + + "\tListUsers\022%.google.cloud.ftp.v1.ListUser" + + "sRequest\032&.google.cloud.ftp.v1.ListUsers" + + "Response\"D\332A\006parent\202\323\344\223\0025\0223/v1/{parent=p" + + "rojects/*/locations/*/servers/*}/users\022\215\001\n" + + "\007GetUser\022#.google.cloud.ftp.v1.GetUser" + + "Request\032\031.google.cloud.ftp.v1.User\"B\332A\004n" + + "ame\202\323\344\223\0025\0223/v1/{name=projects/*/locations/*/servers/*/users/*}\022\310\001\n\n" + + "CreateUser\022&." + + "google.cloud.ftp.v1.CreateUserRequest\032\035.google.longrunning.Operation\"s\312A\031\n" + + "\004User\022\021OperationMetadata\332A\023parent,user,user_id" + + "\202\323\344\223\002;\"3/v1/{parent=projects/*/locations/*/servers/*}/users:\004user\022\312\001\n\n" + + "UpdateUser" + + "\022&.google.cloud.ftp.v1.UpdateUserRequest\032\035.google.longrunning.Operation\"u\312A\031\n" + + "\004User\022\021OperationMetadata\332A\020user,update_mask" + + "\202\323\344\223\002@28/v1/{user.name=projects/*/locations/*/servers/*/users/*}:\004user\022\304\001\n\n" + + "DeleteUser\022&.google.cloud.ftp.v1.DeleteUserRe" + + "quest\032\035.google.longrunning.Operation\"o\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetad" + + "ata\332A\004name\202\323\344\223\0025*3/v1/{name=projects/*/locations/*/servers/*/users/*}\022\270\001\n" + + "\013StartServer\022\'.google.cloud.ftp.v1.StartServerR" + + "equest\032\035.google.longrunning.Operation\"a\312A\033\n" + + "\006Server\022\021OperationMetadata\332A\004name\202\323\344\223" + + "\0026\"1/v1/{name=projects/*/locations/*/servers/*}:start:\001*\022\265\001\n\n" + + "StopServer\022&.google" + + ".cloud.ftp.v1.StopServerRequest\032\035.google.longrunning.Operation\"`\312A\033\n" + + "\006Server\022\021OperationMetadata\332A\004name\202\323\344\223\0025\"0/v1/{name=p" + + "rojects/*/locations/*/servers/*}:stop:\001*" + + "\032F\312A\022ftp.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\325\003\n" + + "\027com.google.cloud.ftp.v1B\014ServiceProtoP\001Z)cl" + + "oud.google.com/go/ftp/apiv1/ftppb;ftppb\252" + + "\002\023Google.Cloud.Ftp.V1\312\002\023Google\\Cloud\\Ftp\\V1\352\002\026Google::Cloud::Ftp::V1\352An\n" + + "%compute.googleapis.com/ForwardingRule\022Eprojects" + + "/{project}/regions/{region}/forwardingRules/{forwarding_rule}\352AN\n" + + "\036compute.google" + + "apis.com/Network\022,projects/{project}/global/networks/{network}\352Aw\n" + + "(compute.googleapis.com/ServiceAttachment\022Kprojects/{p" + + "roject}/regions/{region}/serviceAttachments/{service_attachment}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_ftp_v1_ExternalServerConfig_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_ftp_v1_ExternalServerConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_ExternalServerConfig_descriptor, + new java.lang.String[] { + "IpAddress", "AllowedCidrBlocks", + }); + internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_ftp_v1_InternalServerConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor, + new java.lang.String[] { + "ServiceAttachment", "ConsumerAcceptList", "ConsumerRejectList", "PscEndpoints", + }); + internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_descriptor = + internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor.getNestedType(0); + internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_InternalServerConfig_AllowedConsumer_descriptor, + new java.lang.String[] { + "Project", "ConnectionLimit", "ConsumerType", + }); + internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_descriptor = + internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor.getNestedType(1); + internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_InternalServerConfig_DeniedConsumer_descriptor, + new java.lang.String[] { + "Project", "ConsumerType", + }); + internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_descriptor = + internal_static_google_cloud_ftp_v1_InternalServerConfig_descriptor.getNestedType(2); + internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_InternalServerConfig_PscEndpoint_descriptor, + new java.lang.String[] { + "Endpoint", "Network", "Status", + }); + internal_static_google_cloud_ftp_v1_ServerCredential_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_ftp_v1_ServerCredential_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_ServerCredential_descriptor, + new java.lang.String[] { + "Fingerprint", "AsymmetricAlgorithm", + }); + internal_static_google_cloud_ftp_v1_Server_descriptor = getDescriptor().getMessageType(3); + internal_static_google_cloud_ftp_v1_Server_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_Server_descriptor, + new java.lang.String[] { + "ExternalConfig", + "InternalConfig", + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "DisplayName", + "AccessType", + "State", + "GoogleManagedServerCredential", + "ServiceAgent", + "AccessConfig", + }); + internal_static_google_cloud_ftp_v1_Server_LabelsEntry_descriptor = + internal_static_google_cloud_ftp_v1_Server_descriptor.getNestedType(0); + internal_static_google_cloud_ftp_v1_Server_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_Server_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_ftp_v1_ListServersRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_ftp_v1_ListServersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_ListServersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_ftp_v1_ListServersResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_ftp_v1_ListServersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_ListServersResponse_descriptor, + new java.lang.String[] { + "Servers", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_ftp_v1_GetServerRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_ftp_v1_GetServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_GetServerRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_ftp_v1_CreateServerRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_ftp_v1_CreateServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_CreateServerRequest_descriptor, + new java.lang.String[] { + "Parent", "ServerId", "Server", "RequestId", + }); + internal_static_google_cloud_ftp_v1_UpdateServerRequest_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_ftp_v1_UpdateServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_UpdateServerRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Server", "RequestId", + }); + internal_static_google_cloud_ftp_v1_DeleteServerRequest_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_ftp_v1_DeleteServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_DeleteServerRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_descriptor, + new java.lang.String[] { + "Bucket", "BucketPrefix", "Directory", "Permission", + }); + internal_static_google_cloud_ftp_v1_User_descriptor = getDescriptor().getMessageType(11); + internal_static_google_cloud_ftp_v1_User_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_User_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Username", + "CustomerServiceAccount", + "State", + "UserCredentials", + "StorageDirectoryMappings", + }); + internal_static_google_cloud_ftp_v1_User_LabelsEntry_descriptor = + internal_static_google_cloud_ftp_v1_User_descriptor.getNestedType(0); + internal_static_google_cloud_ftp_v1_User_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_User_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_ftp_v1_ListUsersRequest_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_ftp_v1_ListUsersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_ListUsersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_ftp_v1_ListUsersResponse_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_cloud_ftp_v1_ListUsersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_ListUsersResponse_descriptor, + new java.lang.String[] { + "Users", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_ftp_v1_GetUserRequest_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_cloud_ftp_v1_GetUserRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_GetUserRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_ftp_v1_CreateUserRequest_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_cloud_ftp_v1_CreateUserRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_CreateUserRequest_descriptor, + new java.lang.String[] { + "Parent", "UserId", "User", "RequestId", + }); + internal_static_google_cloud_ftp_v1_UpdateUserRequest_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_cloud_ftp_v1_UpdateUserRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_UpdateUserRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "User", + }); + internal_static_google_cloud_ftp_v1_DeleteUserRequest_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_cloud_ftp_v1_DeleteUserRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_DeleteUserRequest_descriptor, + new java.lang.String[] { + "Name", "Force", + }); + internal_static_google_cloud_ftp_v1_StartServerRequest_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_cloud_ftp_v1_StartServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_StartServerRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_ftp_v1_StopServerRequest_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_cloud_ftp_v1_StopServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_StopServerRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_ftp_v1_UserCredential_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_cloud_ftp_v1_UserCredential_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_UserCredential_descriptor, + new java.lang.String[] { + "CredentialName", "CredentialType", "SshPublicKeyBody", + }); + internal_static_google_cloud_ftp_v1_OperationMetadata_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_cloud_ftp_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_ftp_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StartServerRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StartServerRequest.java new file mode 100644 index 000000000000..abd03d72825e --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StartServerRequest.java @@ -0,0 +1,616 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Request message for starting a Server.
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.StartServerRequest} + */ +@com.google.protobuf.Generated +public final class StartServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.StartServerRequest) + StartServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "StartServerRequest"); + } + + // Use StartServerRequest.newBuilder() to construct. + private StartServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StartServerRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StartServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StartServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.StartServerRequest.class, + com.google.cloud.ftp.v1.StartServerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * Format: `projects/{project}/locations/{location}/servers/{server}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource
+   * Format: `projects/{project}/locations/{location}/servers/{server}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.StartServerRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.StartServerRequest other = + (com.google.cloud.ftp.v1.StartServerRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StartServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.StartServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for starting a Server.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.StartServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.StartServerRequest) + com.google.cloud.ftp.v1.StartServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StartServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StartServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.StartServerRequest.class, + com.google.cloud.ftp.v1.StartServerRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.StartServerRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StartServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StartServerRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.StartServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StartServerRequest build() { + com.google.cloud.ftp.v1.StartServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StartServerRequest buildPartial() { + com.google.cloud.ftp.v1.StartServerRequest result = + new com.google.cloud.ftp.v1.StartServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.StartServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.StartServerRequest) { + return mergeFrom((com.google.cloud.ftp.v1.StartServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.StartServerRequest other) { + if (other == com.google.cloud.ftp.v1.StartServerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.StartServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.StartServerRequest) + private static final com.google.cloud.ftp.v1.StartServerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.StartServerRequest(); + } + + public static com.google.cloud.ftp.v1.StartServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StartServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StartServerRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StartServerRequestOrBuilder.java new file mode 100644 index 000000000000..4c6126e97b78 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StartServerRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface StartServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.StartServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * Format: `projects/{project}/locations/{location}/servers/{server}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * Format: `projects/{project}/locations/{location}/servers/{server}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StopServerRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StopServerRequest.java new file mode 100644 index 000000000000..4e626c74ef1d --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StopServerRequest.java @@ -0,0 +1,616 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Request message for stopping a Server.
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.StopServerRequest} + */ +@com.google.protobuf.Generated +public final class StopServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.StopServerRequest) + StopServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "StopServerRequest"); + } + + // Use StopServerRequest.newBuilder() to construct. + private StopServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StopServerRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StopServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StopServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.StopServerRequest.class, + com.google.cloud.ftp.v1.StopServerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format: `projects/{project}/locations/{location}/servers/{server}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format: `projects/{project}/locations/{location}/servers/{server}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.StopServerRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.StopServerRequest other = + (com.google.cloud.ftp.v1.StopServerRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StopServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.StopServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for stopping a Server.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.StopServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.StopServerRequest) + com.google.cloud.ftp.v1.StopServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StopServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StopServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.StopServerRequest.class, + com.google.cloud.ftp.v1.StopServerRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.StopServerRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StopServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StopServerRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.StopServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StopServerRequest build() { + com.google.cloud.ftp.v1.StopServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StopServerRequest buildPartial() { + com.google.cloud.ftp.v1.StopServerRequest result = + new com.google.cloud.ftp.v1.StopServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.StopServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.StopServerRequest) { + return mergeFrom((com.google.cloud.ftp.v1.StopServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.StopServerRequest other) { + if (other == com.google.cloud.ftp.v1.StopServerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * Format: `projects/{project}/locations/{location}/servers/{server}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.StopServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.StopServerRequest) + private static final com.google.cloud.ftp.v1.StopServerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.StopServerRequest(); + } + + public static com.google.cloud.ftp.v1.StopServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StopServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StopServerRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StopServerRequestOrBuilder.java new file mode 100644 index 000000000000..b12b02dbd04d --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StopServerRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface StopServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.StopServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format: `projects/{project}/locations/{location}/servers/{server}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * Format: `projects/{project}/locations/{location}/servers/{server}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StorageDirectoryMapping.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StorageDirectoryMapping.java new file mode 100644 index 000000000000..89cd92733d92 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StorageDirectoryMapping.java @@ -0,0 +1,1352 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Mapping of backing Cloud Storage path to the directory where the user lands
+ * in the SFTP server. If directory is not specified, it'll default to '/'.
+ *
+ * Eg 1 -
+ * (bucket_name: bucket, bucket_prefix: path1/path2, directory:
+ * /abc/def/username)
+ *
+ * The user will land at /abcd/def/username, and the view there will match that
+ * of /bucket/path1/path2. The user will not be aware of Cloud Storage prefix
+ * '/bucket/path1' and there will be no such directory in the view.
+ *
+ * Eg 2 -
+ * (bucket_name: bucket, bucket_prefix: path1/path2, directory: '')
+ *
+ * The user will land at '/', and the view there will match
+ * that of /bucket/path1/path2. The user will not be aware of Cloud Storage
+ * prefix '/bucket/path1/path2' and there will be no such directory in the view.
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.StorageDirectoryMapping} + */ +@com.google.protobuf.Generated +public final class StorageDirectoryMapping extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.StorageDirectoryMapping) + StorageDirectoryMappingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "StorageDirectoryMapping"); + } + + // Use StorageDirectoryMapping.newBuilder() to construct. + private StorageDirectoryMapping(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StorageDirectoryMapping() { + bucket_ = ""; + bucketPrefix_ = ""; + directory_ = ""; + permission_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.StorageDirectoryMapping.class, + com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder.class); + } + + /** + * + * + *
+   * Tracks read/write access to the bucket.
+   * 
+ * + * Protobuf enum {@code google.cloud.ftp.v1.StorageDirectoryMapping.Permission} + */ + public enum Permission implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Permission unspecified.
+     * 
+ * + * PERMISSION_UNSPECIFIED = 0; + */ + PERMISSION_UNSPECIFIED(0), + /** + * + * + *
+     * Read only permission.
+     * 
+ * + * READ_ONLY = 1; + */ + READ_ONLY(1), + /** + * + * + *
+     * Read write permission.
+     * 
+ * + * READ_WRITE = 2; + */ + READ_WRITE(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Permission"); + } + + /** + * + * + *
+     * Permission unspecified.
+     * 
+ * + * PERMISSION_UNSPECIFIED = 0; + */ + public static final int PERMISSION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Read only permission.
+     * 
+ * + * READ_ONLY = 1; + */ + public static final int READ_ONLY_VALUE = 1; + + /** + * + * + *
+     * Read write permission.
+     * 
+ * + * READ_WRITE = 2; + */ + public static final int READ_WRITE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Permission valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Permission forNumber(int value) { + switch (value) { + case 0: + return PERMISSION_UNSPECIFIED; + case 1: + return READ_ONLY; + case 2: + return READ_WRITE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Permission findValueByNumber(int number) { + return Permission.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.ftp.v1.StorageDirectoryMapping.getDescriptor().getEnumTypes().get(0); + } + + private static final Permission[] VALUES = values(); + + public static Permission valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Permission(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.ftp.v1.StorageDirectoryMapping.Permission) + } + + public static final int BUCKET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object bucket_ = ""; + + /** + * + * + *
+   * Required. Name of the bucket.
+   * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + @java.lang.Override + public java.lang.String getBucket() { + java.lang.Object ref = bucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucket_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the bucket.
+   * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBucketBytes() { + java.lang.Object ref = bucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUCKET_PREFIX_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object bucketPrefix_ = ""; + + /** + * + * + *
+   * Optional. Prefix inside the bucket.
+   * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bucketPrefix. + */ + @java.lang.Override + public java.lang.String getBucketPrefix() { + java.lang.Object ref = bucketPrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketPrefix_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Prefix inside the bucket.
+   * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for bucketPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBucketPrefixBytes() { + java.lang.Object ref = bucketPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIRECTORY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object directory_ = ""; + + /** + * + * + *
+   * Required. Directory where the user lands in the SFTP server.
+   * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The directory. + */ + @java.lang.Override + public java.lang.String getDirectory() { + java.lang.Object ref = directory_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + directory_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Directory where the user lands in the SFTP server.
+   * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for directory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDirectoryBytes() { + java.lang.Object ref = directory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + directory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 4; + private int permission_ = 0; + + /** + * + * + *
+   * Required. Permission to the bucket.
+   * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for permission. + */ + @java.lang.Override + public int getPermissionValue() { + return permission_; + } + + /** + * + * + *
+   * Required. Permission to the bucket.
+   * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The permission. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission getPermission() { + com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission result = + com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission.forNumber(permission_); + return result == null + ? com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, bucket_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucketPrefix_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, bucketPrefix_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(directory_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, directory_); + } + if (permission_ + != com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission.PERMISSION_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, permission_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, bucket_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bucketPrefix_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, bucketPrefix_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(directory_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, directory_); + } + if (permission_ + != com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission.PERMISSION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, permission_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.StorageDirectoryMapping)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.StorageDirectoryMapping other = + (com.google.cloud.ftp.v1.StorageDirectoryMapping) obj; + + if (!getBucket().equals(other.getBucket())) return false; + if (!getBucketPrefix().equals(other.getBucketPrefix())) return false; + if (!getDirectory().equals(other.getDirectory())) return false; + if (permission_ != other.permission_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getBucket().hashCode(); + hash = (37 * hash) + BUCKET_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getBucketPrefix().hashCode(); + hash = (37 * hash) + DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getDirectory().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + permission_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.StorageDirectoryMapping prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Mapping of backing Cloud Storage path to the directory where the user lands
+   * in the SFTP server. If directory is not specified, it'll default to '/'.
+   *
+   * Eg 1 -
+   * (bucket_name: bucket, bucket_prefix: path1/path2, directory:
+   * /abc/def/username)
+   *
+   * The user will land at /abcd/def/username, and the view there will match that
+   * of /bucket/path1/path2. The user will not be aware of Cloud Storage prefix
+   * '/bucket/path1' and there will be no such directory in the view.
+   *
+   * Eg 2 -
+   * (bucket_name: bucket, bucket_prefix: path1/path2, directory: '')
+   *
+   * The user will land at '/', and the view there will match
+   * that of /bucket/path1/path2. The user will not be aware of Cloud Storage
+   * prefix '/bucket/path1/path2' and there will be no such directory in the view.
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.StorageDirectoryMapping} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.StorageDirectoryMapping) + com.google.cloud.ftp.v1.StorageDirectoryMappingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.StorageDirectoryMapping.class, + com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.StorageDirectoryMapping.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bucket_ = ""; + bucketPrefix_ = ""; + directory_ = ""; + permission_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_StorageDirectoryMapping_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StorageDirectoryMapping getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.StorageDirectoryMapping.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StorageDirectoryMapping build() { + com.google.cloud.ftp.v1.StorageDirectoryMapping result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StorageDirectoryMapping buildPartial() { + com.google.cloud.ftp.v1.StorageDirectoryMapping result = + new com.google.cloud.ftp.v1.StorageDirectoryMapping(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.StorageDirectoryMapping result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bucket_ = bucket_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bucketPrefix_ = bucketPrefix_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.directory_ = directory_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.permission_ = permission_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.StorageDirectoryMapping) { + return mergeFrom((com.google.cloud.ftp.v1.StorageDirectoryMapping) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.StorageDirectoryMapping other) { + if (other == com.google.cloud.ftp.v1.StorageDirectoryMapping.getDefaultInstance()) + return this; + if (!other.getBucket().isEmpty()) { + bucket_ = other.bucket_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBucketPrefix().isEmpty()) { + bucketPrefix_ = other.bucketPrefix_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDirectory().isEmpty()) { + directory_ = other.directory_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.permission_ != 0) { + setPermissionValue(other.getPermissionValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + bucket_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + bucketPrefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + directory_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + permission_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object bucket_ = ""; + + /** + * + * + *
+     * Required. Name of the bucket.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + public java.lang.String getBucket() { + java.lang.Object ref = bucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the bucket.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucket. + */ + public com.google.protobuf.ByteString getBucketBytes() { + java.lang.Object ref = bucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the bucket.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bucket to set. + * @return This builder for chaining. + */ + public Builder setBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bucket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the bucket.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBucket() { + bucket_ = getDefaultInstance().getBucket(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the bucket.
+     * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for bucket to set. + * @return This builder for chaining. + */ + public Builder setBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bucket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object bucketPrefix_ = ""; + + /** + * + * + *
+     * Optional. Prefix inside the bucket.
+     * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bucketPrefix. + */ + public java.lang.String getBucketPrefix() { + java.lang.Object ref = bucketPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Prefix inside the bucket.
+     * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for bucketPrefix. + */ + public com.google.protobuf.ByteString getBucketPrefixBytes() { + java.lang.Object ref = bucketPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Prefix inside the bucket.
+     * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bucketPrefix to set. + * @return This builder for chaining. + */ + public Builder setBucketPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bucketPrefix_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Prefix inside the bucket.
+     * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBucketPrefix() { + bucketPrefix_ = getDefaultInstance().getBucketPrefix(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Prefix inside the bucket.
+     * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for bucketPrefix to set. + * @return This builder for chaining. + */ + public Builder setBucketPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bucketPrefix_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object directory_ = ""; + + /** + * + * + *
+     * Required. Directory where the user lands in the SFTP server.
+     * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The directory. + */ + public java.lang.String getDirectory() { + java.lang.Object ref = directory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + directory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Directory where the user lands in the SFTP server.
+     * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for directory. + */ + public com.google.protobuf.ByteString getDirectoryBytes() { + java.lang.Object ref = directory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + directory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Directory where the user lands in the SFTP server.
+     * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The directory to set. + * @return This builder for chaining. + */ + public Builder setDirectory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + directory_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Directory where the user lands in the SFTP server.
+     * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDirectory() { + directory_ = getDefaultInstance().getDirectory(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Directory where the user lands in the SFTP server.
+     * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for directory to set. + * @return This builder for chaining. + */ + public Builder setDirectoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + directory_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int permission_ = 0; + + /** + * + * + *
+     * Required. Permission to the bucket.
+     * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for permission. + */ + @java.lang.Override + public int getPermissionValue() { + return permission_; + } + + /** + * + * + *
+     * Required. Permission to the bucket.
+     * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionValue(int value) { + permission_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Permission to the bucket.
+     * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The permission. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission getPermission() { + com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission result = + com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission.forNumber(permission_); + return result == null + ? com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Permission to the bucket.
+     * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission(com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + permission_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Permission to the bucket.
+     * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPermission() { + bitField0_ = (bitField0_ & ~0x00000008); + permission_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.StorageDirectoryMapping) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.StorageDirectoryMapping) + private static final com.google.cloud.ftp.v1.StorageDirectoryMapping DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.StorageDirectoryMapping(); + } + + public static com.google.cloud.ftp.v1.StorageDirectoryMapping getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageDirectoryMapping parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.StorageDirectoryMapping getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StorageDirectoryMappingOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StorageDirectoryMappingOrBuilder.java new file mode 100644 index 000000000000..779aaf3e938b --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/StorageDirectoryMappingOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface StorageDirectoryMappingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.StorageDirectoryMapping) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the bucket.
+   * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + java.lang.String getBucket(); + + /** + * + * + *
+   * Required. Name of the bucket.
+   * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucket. + */ + com.google.protobuf.ByteString getBucketBytes(); + + /** + * + * + *
+   * Optional. Prefix inside the bucket.
+   * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bucketPrefix. + */ + java.lang.String getBucketPrefix(); + + /** + * + * + *
+   * Optional. Prefix inside the bucket.
+   * 
+ * + * string bucket_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for bucketPrefix. + */ + com.google.protobuf.ByteString getBucketPrefixBytes(); + + /** + * + * + *
+   * Required. Directory where the user lands in the SFTP server.
+   * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The directory. + */ + java.lang.String getDirectory(); + + /** + * + * + *
+   * Required. Directory where the user lands in the SFTP server.
+   * 
+ * + * string directory = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for directory. + */ + com.google.protobuf.ByteString getDirectoryBytes(); + + /** + * + * + *
+   * Required. Permission to the bucket.
+   * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for permission. + */ + int getPermissionValue(); + + /** + * + * + *
+   * Required. Permission to the bucket.
+   * 
+ * + * + * .google.cloud.ftp.v1.StorageDirectoryMapping.Permission permission = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The permission. + */ + com.google.cloud.ftp.v1.StorageDirectoryMapping.Permission getPermission(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateServerRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateServerRequest.java new file mode 100644 index 000000000000..fb5703fe048f --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateServerRequest.java @@ -0,0 +1,1334 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for updating a Server
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.UpdateServerRequest} + */ +@com.google.protobuf.Generated +public final class UpdateServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.UpdateServerRequest) + UpdateServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateServerRequest"); + } + + // Use UpdateServerRequest.newBuilder() to construct. + private UpdateServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateServerRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.UpdateServerRequest.class, + com.google.cloud.ftp.v1.UpdateServerRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Server resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Server resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Server resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SERVER_FIELD_NUMBER = 2; + private com.google.cloud.ftp.v1.Server server_; + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the server field is set. + */ + @java.lang.Override + public boolean hasServer() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The server. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.Server getServer() { + return server_ == null ? com.google.cloud.ftp.v1.Server.getDefaultInstance() : server_; + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.ServerOrBuilder getServerOrBuilder() { + return server_ == null ? com.google.cloud.ftp.v1.Server.getDefaultInstance() : server_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getServer()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServer()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.UpdateServerRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.UpdateServerRequest other = + (com.google.cloud.ftp.v1.UpdateServerRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasServer() != other.hasServer()) return false; + if (hasServer()) { + if (!getServer().equals(other.getServer())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasServer()) { + hash = (37 * hash) + SERVER_FIELD_NUMBER; + hash = (53 * hash) + getServer().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.UpdateServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for updating a Server
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.UpdateServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.UpdateServerRequest) + com.google.cloud.ftp.v1.UpdateServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.UpdateServerRequest.class, + com.google.cloud.ftp.v1.UpdateServerRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.UpdateServerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetServerFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + server_ = null; + if (serverBuilder_ != null) { + serverBuilder_.dispose(); + serverBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UpdateServerRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.UpdateServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UpdateServerRequest build() { + com.google.cloud.ftp.v1.UpdateServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UpdateServerRequest buildPartial() { + com.google.cloud.ftp.v1.UpdateServerRequest result = + new com.google.cloud.ftp.v1.UpdateServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.UpdateServerRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.server_ = serverBuilder_ == null ? server_ : serverBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.UpdateServerRequest) { + return mergeFrom((com.google.cloud.ftp.v1.UpdateServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.UpdateServerRequest other) { + if (other == com.google.cloud.ftp.v1.UpdateServerRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasServer()) { + mergeServer(other.getServer()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetServerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Server resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.ftp.v1.Server server_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder> + serverBuilder_; + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the server field is set. + */ + public boolean hasServer() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The server. + */ + public com.google.cloud.ftp.v1.Server getServer() { + if (serverBuilder_ == null) { + return server_ == null ? com.google.cloud.ftp.v1.Server.getDefaultInstance() : server_; + } else { + return serverBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setServer(com.google.cloud.ftp.v1.Server value) { + if (serverBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + server_ = value; + } else { + serverBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setServer(com.google.cloud.ftp.v1.Server.Builder builderForValue) { + if (serverBuilder_ == null) { + server_ = builderForValue.build(); + } else { + serverBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeServer(com.google.cloud.ftp.v1.Server value) { + if (serverBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && server_ != null + && server_ != com.google.cloud.ftp.v1.Server.getDefaultInstance()) { + getServerBuilder().mergeFrom(value); + } else { + server_ = value; + } + } else { + serverBuilder_.mergeFrom(value); + } + if (server_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearServer() { + bitField0_ = (bitField0_ & ~0x00000002); + server_ = null; + if (serverBuilder_ != null) { + serverBuilder_.dispose(); + serverBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.Server.Builder getServerBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetServerFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.ServerOrBuilder getServerOrBuilder() { + if (serverBuilder_ != null) { + return serverBuilder_.getMessageOrBuilder(); + } else { + return server_ == null ? com.google.cloud.ftp.v1.Server.getDefaultInstance() : server_; + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder> + internalGetServerFieldBuilder() { + if (serverBuilder_ == null) { + serverBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.Server, + com.google.cloud.ftp.v1.Server.Builder, + com.google.cloud.ftp.v1.ServerOrBuilder>( + getServer(), getParentForChildren(), isClean()); + server_ = null; + } + return serverBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.UpdateServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.UpdateServerRequest) + private static final com.google.cloud.ftp.v1.UpdateServerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.UpdateServerRequest(); + } + + public static com.google.cloud.ftp.v1.UpdateServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UpdateServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateServerRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateServerRequestOrBuilder.java new file mode 100644 index 000000000000..164be9881ad5 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateServerRequestOrBuilder.java @@ -0,0 +1,174 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface UpdateServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.UpdateServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Server resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Server resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Server resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the server field is set. + */ + boolean hasServer(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The server. + */ + com.google.cloud.ftp.v1.Server getServer(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.Server server = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.ftp.v1.ServerOrBuilder getServerOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateUserRequest.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateUserRequest.java new file mode 100644 index 000000000000..6cdd9380e051 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateUserRequest.java @@ -0,0 +1,1037 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message for updating a User
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.UpdateUserRequest} + */ +@com.google.protobuf.Generated +public final class UpdateUserRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.UpdateUserRequest) + UpdateUserRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateUserRequest"); + } + + // Use UpdateUserRequest.newBuilder() to construct. + private UpdateUserRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateUserRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.UpdateUserRequest.class, + com.google.cloud.ftp.v1.UpdateUserRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * User resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * User resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * User resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int USER_FIELD_NUMBER = 2; + private com.google.cloud.ftp.v1.User user_; + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.User getUser() { + return user_ == null ? com.google.cloud.ftp.v1.User.getDefaultInstance() : user_; + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserOrBuilder getUserOrBuilder() { + return user_ == null ? com.google.cloud.ftp.v1.User.getDefaultInstance() : user_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUser()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUser()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.UpdateUserRequest)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.UpdateUserRequest other = + (com.google.cloud.ftp.v1.UpdateUserRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser().equals(other.getUser())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.UpdateUserRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for updating a User
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.UpdateUserRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.UpdateUserRequest) + com.google.cloud.ftp.v1.UpdateUserRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.UpdateUserRequest.class, + com.google.cloud.ftp.v1.UpdateUserRequest.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.UpdateUserRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetUserFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UpdateUserRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UpdateUserRequest getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.UpdateUserRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UpdateUserRequest build() { + com.google.cloud.ftp.v1.UpdateUserRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UpdateUserRequest buildPartial() { + com.google.cloud.ftp.v1.UpdateUserRequest result = + new com.google.cloud.ftp.v1.UpdateUserRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.UpdateUserRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null ? user_ : userBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.UpdateUserRequest) { + return mergeFrom((com.google.cloud.ftp.v1.UpdateUserRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.UpdateUserRequest other) { + if (other == com.google.cloud.ftp.v1.UpdateUserRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetUserFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * User resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.ftp.v1.User user_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder> + userBuilder_; + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + public com.google.cloud.ftp.v1.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? com.google.cloud.ftp.v1.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUser(com.google.cloud.ftp.v1.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUser(com.google.cloud.ftp.v1.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUser(com.google.cloud.ftp.v1.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && user_ != null + && user_ != com.google.cloud.ftp.v1.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.ftp.v1.User.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUserFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.ftp.v1.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? com.google.cloud.ftp.v1.User.getDefaultInstance() : user_; + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder> + internalGetUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.ftp.v1.User, + com.google.cloud.ftp.v1.User.Builder, + com.google.cloud.ftp.v1.UserOrBuilder>( + getUser(), getParentForChildren(), isClean()); + user_ = null; + } + return userBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.UpdateUserRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.UpdateUserRequest) + private static final com.google.cloud.ftp.v1.UpdateUserRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.UpdateUserRequest(); + } + + public static com.google.cloud.ftp.v1.UpdateUserRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateUserRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UpdateUserRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateUserRequestOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateUserRequestOrBuilder.java new file mode 100644 index 000000000000..cbe8e805b0cc --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UpdateUserRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface UpdateUserRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.UpdateUserRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * User resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * User resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * User resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the user field is set. + */ + boolean hasUser(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + com.google.cloud.ftp.v1.User getUser(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.ftp.v1.User user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.ftp.v1.UserOrBuilder getUserOrBuilder(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/User.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/User.java new file mode 100644 index 000000000000..20ab956c3cca --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/User.java @@ -0,0 +1,3520 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message describing User object
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.User} + */ +@com.google.protobuf.Generated +public final class User extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.User) + UserOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "User"); + } + + // Use User.newBuilder() to construct. + private User(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private User() { + name_ = ""; + username_ = ""; + customerServiceAccount_ = ""; + state_ = 0; + userCredentials_ = java.util.Collections.emptyList(); + storageDirectoryMappings_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto.internal_static_google_cloud_ftp_v1_User_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.User.class, com.google.cloud.ftp.v1.User.Builder.class); + } + + /** + * + * + *
+   * Tracks user creation.
+   * 
+ * + * Protobuf enum {@code google.cloud.ftp.v1.User.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * User is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * User is ready to be used.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * User creation failed.
+     * 
+ * + * ERROR = 3; + */ + ERROR(3), + /** + * + * + *
+     * The resource is being updated.
+     * 
+ * + * UPDATING = 4; + */ + UPDATING(4), + /** + * + * + *
+     * The resource is being deleted.
+     * 
+ * + * DELETING = 5; + */ + DELETING(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * User is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * User is ready to be used.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * User creation failed.
+     * 
+ * + * ERROR = 3; + */ + public static final int ERROR_VALUE = 3; + + /** + * + * + *
+     * The resource is being updated.
+     * 
+ * + * UPDATING = 4; + */ + public static final int UPDATING_VALUE = 4; + + /** + * + * + *
+     * The resource is being deleted.
+     * 
+ * + * DELETING = 5; + */ + public static final int DELETING_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + case 3: + return ERROR; + case 4: + return UPDATING; + case 5: + return DELETING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.ftp.v1.User.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.ftp.v1.User.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. User-friendly name via which User will be identified.
+   * projects/{project}/locations/{location}/servers/{server}/users/{user}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. User-friendly name via which User will be identified.
+   * projects/{project}/locations/{location}/servers/{server}/users/{user}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_User_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int USERNAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + + /** + * + * + *
+   * Output only. [Output only] The username of the user.
+   * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. [Output only] The username of the user.
+   * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOMER_SERVICE_ACCOUNT_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object customerServiceAccount_ = ""; + + /** + * + * + *
+   * Required. Service account in customer project attached to this SFTP User.
+   * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customerServiceAccount. + */ + @java.lang.Override + public java.lang.String getCustomerServiceAccount() { + java.lang.Object ref = customerServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerServiceAccount_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Service account in customer project attached to this SFTP User.
+   * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customerServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerServiceAccountBytes() { + java.lang.Object ref = customerServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_ = 0; + + /** + * + * + *
+   * Output only. Tracks user creation.
+   * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. Tracks user creation.
+   * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.User.State getState() { + com.google.cloud.ftp.v1.User.State result = + com.google.cloud.ftp.v1.User.State.forNumber(state_); + return result == null ? com.google.cloud.ftp.v1.User.State.UNRECOGNIZED : result; + } + + public static final int USER_CREDENTIALS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List userCredentials_; + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getUserCredentialsList() { + return userCredentials_; + } + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getUserCredentialsOrBuilderList() { + return userCredentials_; + } + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getUserCredentialsCount() { + return userCredentials_.size(); + } + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserCredential getUserCredentials(int index) { + return userCredentials_.get(index); + } + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserCredentialOrBuilder getUserCredentialsOrBuilder(int index) { + return userCredentials_.get(index); + } + + public static final int STORAGE_DIRECTORY_MAPPINGS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List storageDirectoryMappings_; + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getStorageDirectoryMappingsList() { + return storageDirectoryMappings_; + } + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getStorageDirectoryMappingsOrBuilderList() { + return storageDirectoryMappings_; + } + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getStorageDirectoryMappingsCount() { + return storageDirectoryMappings_.size(); + } + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.StorageDirectoryMapping getStorageDirectoryMappings(int index) { + return storageDirectoryMappings_.get(index); + } + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.ftp.v1.StorageDirectoryMappingOrBuilder + getStorageDirectoryMappingsOrBuilder(int index) { + return storageDirectoryMappings_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, username_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customerServiceAccount_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, customerServiceAccount_); + } + if (state_ != com.google.cloud.ftp.v1.User.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, state_); + } + for (int i = 0; i < userCredentials_.size(); i++) { + output.writeMessage(9, userCredentials_.get(i)); + } + for (int i = 0; i < storageDirectoryMappings_.size(); i++) { + output.writeMessage(10, storageDirectoryMappings_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, username_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customerServiceAccount_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, customerServiceAccount_); + } + if (state_ != com.google.cloud.ftp.v1.User.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + for (int i = 0; i < userCredentials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, userCredentials_.get(i)); + } + for (int i = 0; i < storageDirectoryMappings_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, storageDirectoryMappings_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.User)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.User other = (com.google.cloud.ftp.v1.User) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getUsername().equals(other.getUsername())) return false; + if (!getCustomerServiceAccount().equals(other.getCustomerServiceAccount())) return false; + if (state_ != other.state_) return false; + if (!getUserCredentialsList().equals(other.getUserCredentialsList())) return false; + if (!getStorageDirectoryMappingsList().equals(other.getStorageDirectoryMappingsList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (37 * hash) + CUSTOMER_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getCustomerServiceAccount().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getUserCredentialsCount() > 0) { + hash = (37 * hash) + USER_CREDENTIALS_FIELD_NUMBER; + hash = (53 * hash) + getUserCredentialsList().hashCode(); + } + if (getStorageDirectoryMappingsCount() > 0) { + hash = (37 * hash) + STORAGE_DIRECTORY_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getStorageDirectoryMappingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.User parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.User parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.User parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.User parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.User parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.User parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.User parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.User parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.User parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.User parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.User parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.User parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.User prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing User object
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.User} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.User) + com.google.cloud.ftp.v1.UserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_User_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.User.class, com.google.cloud.ftp.v1.User.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.User.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetUserCredentialsFieldBuilder(); + internalGetStorageDirectoryMappingsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + username_ = ""; + customerServiceAccount_ = ""; + state_ = 0; + if (userCredentialsBuilder_ == null) { + userCredentials_ = java.util.Collections.emptyList(); + } else { + userCredentials_ = null; + userCredentialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (storageDirectoryMappingsBuilder_ == null) { + storageDirectoryMappings_ = java.util.Collections.emptyList(); + } else { + storageDirectoryMappings_ = null; + storageDirectoryMappingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_User_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.User getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.User.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.User build() { + com.google.cloud.ftp.v1.User result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.User buildPartial() { + com.google.cloud.ftp.v1.User result = new com.google.cloud.ftp.v1.User(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.ftp.v1.User result) { + if (userCredentialsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + userCredentials_ = java.util.Collections.unmodifiableList(userCredentials_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.userCredentials_ = userCredentials_; + } else { + result.userCredentials_ = userCredentialsBuilder_.build(); + } + if (storageDirectoryMappingsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + storageDirectoryMappings_ = + java.util.Collections.unmodifiableList(storageDirectoryMappings_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.storageDirectoryMappings_ = storageDirectoryMappings_; + } else { + result.storageDirectoryMappings_ = storageDirectoryMappingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.ftp.v1.User result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.customerServiceAccount_ = customerServiceAccount_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.User) { + return mergeFrom((com.google.cloud.ftp.v1.User) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.User other) { + if (other == com.google.cloud.ftp.v1.User.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getCustomerServiceAccount().isEmpty()) { + customerServiceAccount_ = other.customerServiceAccount_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (userCredentialsBuilder_ == null) { + if (!other.userCredentials_.isEmpty()) { + if (userCredentials_.isEmpty()) { + userCredentials_ = other.userCredentials_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureUserCredentialsIsMutable(); + userCredentials_.addAll(other.userCredentials_); + } + onChanged(); + } + } else { + if (!other.userCredentials_.isEmpty()) { + if (userCredentialsBuilder_.isEmpty()) { + userCredentialsBuilder_.dispose(); + userCredentialsBuilder_ = null; + userCredentials_ = other.userCredentials_; + bitField0_ = (bitField0_ & ~0x00000080); + userCredentialsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetUserCredentialsFieldBuilder() + : null; + } else { + userCredentialsBuilder_.addAllMessages(other.userCredentials_); + } + } + } + if (storageDirectoryMappingsBuilder_ == null) { + if (!other.storageDirectoryMappings_.isEmpty()) { + if (storageDirectoryMappings_.isEmpty()) { + storageDirectoryMappings_ = other.storageDirectoryMappings_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.addAll(other.storageDirectoryMappings_); + } + onChanged(); + } + } else { + if (!other.storageDirectoryMappings_.isEmpty()) { + if (storageDirectoryMappingsBuilder_.isEmpty()) { + storageDirectoryMappingsBuilder_.dispose(); + storageDirectoryMappingsBuilder_ = null; + storageDirectoryMappings_ = other.storageDirectoryMappings_; + bitField0_ = (bitField0_ & ~0x00000100); + storageDirectoryMappingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetStorageDirectoryMappingsFieldBuilder() + : null; + } else { + storageDirectoryMappingsBuilder_.addAllMessages(other.storageDirectoryMappings_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 58: + { + customerServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 74: + { + com.google.cloud.ftp.v1.UserCredential m = + input.readMessage( + com.google.cloud.ftp.v1.UserCredential.parser(), extensionRegistry); + if (userCredentialsBuilder_ == null) { + ensureUserCredentialsIsMutable(); + userCredentials_.add(m); + } else { + userCredentialsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + com.google.cloud.ftp.v1.StorageDirectoryMapping m = + input.readMessage( + com.google.cloud.ftp.v1.StorageDirectoryMapping.parser(), + extensionRegistry); + if (storageDirectoryMappingsBuilder_ == null) { + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.add(m); + } else { + storageDirectoryMappingsBuilder_.addMessage(m); + } + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. User-friendly name via which User will be identified.
+     * projects/{project}/locations/{location}/servers/{server}/users/{user}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. User-friendly name via which User will be identified.
+     * projects/{project}/locations/{location}/servers/{server}/users/{user}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. User-friendly name via which User will be identified.
+     * projects/{project}/locations/{location}/servers/{server}/users/{user}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. User-friendly name via which User will be identified.
+     * projects/{project}/locations/{location}/servers/{server}/users/{user}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. User-friendly name via which User will be identified.
+     * projects/{project}/locations/{location}/servers/{server}/users/{user}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object username_ = ""; + + /** + * + * + *
+     * Output only. [Output only] The username of the user.
+     * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. [Output only] The username of the user.
+     * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for username. + */ + public com.google.protobuf.ByteString getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. [Output only] The username of the user.
+     * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + username_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] The username of the user.
+     * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] The username of the user.
+     * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object customerServiceAccount_ = ""; + + /** + * + * + *
+     * Required. Service account in customer project attached to this SFTP User.
+     * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customerServiceAccount. + */ + public java.lang.String getCustomerServiceAccount() { + java.lang.Object ref = customerServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Service account in customer project attached to this SFTP User.
+     * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customerServiceAccount. + */ + public com.google.protobuf.ByteString getCustomerServiceAccountBytes() { + java.lang.Object ref = customerServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Service account in customer project attached to this SFTP User.
+     * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The customerServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setCustomerServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customerServiceAccount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Service account in customer project attached to this SFTP User.
+     * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCustomerServiceAccount() { + customerServiceAccount_ = getDefaultInstance().getCustomerServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Service account in customer project attached to this SFTP User.
+     * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for customerServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setCustomerServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customerServiceAccount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. Tracks user creation.
+     * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. Tracks user creation.
+     * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Tracks user creation.
+     * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.User.State getState() { + com.google.cloud.ftp.v1.User.State result = + com.google.cloud.ftp.v1.User.State.forNumber(state_); + return result == null ? com.google.cloud.ftp.v1.User.State.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Output only. Tracks user creation.
+     * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.ftp.v1.User.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Tracks user creation.
+     * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + private java.util.List userCredentials_ = + java.util.Collections.emptyList(); + + private void ensureUserCredentialsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + userCredentials_ = + new java.util.ArrayList(userCredentials_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.UserCredential, + com.google.cloud.ftp.v1.UserCredential.Builder, + com.google.cloud.ftp.v1.UserCredentialOrBuilder> + userCredentialsBuilder_; + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getUserCredentialsList() { + if (userCredentialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(userCredentials_); + } else { + return userCredentialsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getUserCredentialsCount() { + if (userCredentialsBuilder_ == null) { + return userCredentials_.size(); + } else { + return userCredentialsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.UserCredential getUserCredentials(int index) { + if (userCredentialsBuilder_ == null) { + return userCredentials_.get(index); + } else { + return userCredentialsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserCredentials(int index, com.google.cloud.ftp.v1.UserCredential value) { + if (userCredentialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserCredentialsIsMutable(); + userCredentials_.set(index, value); + onChanged(); + } else { + userCredentialsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserCredentials( + int index, com.google.cloud.ftp.v1.UserCredential.Builder builderForValue) { + if (userCredentialsBuilder_ == null) { + ensureUserCredentialsIsMutable(); + userCredentials_.set(index, builderForValue.build()); + onChanged(); + } else { + userCredentialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserCredentials(com.google.cloud.ftp.v1.UserCredential value) { + if (userCredentialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserCredentialsIsMutable(); + userCredentials_.add(value); + onChanged(); + } else { + userCredentialsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserCredentials(int index, com.google.cloud.ftp.v1.UserCredential value) { + if (userCredentialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserCredentialsIsMutable(); + userCredentials_.add(index, value); + onChanged(); + } else { + userCredentialsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserCredentials( + com.google.cloud.ftp.v1.UserCredential.Builder builderForValue) { + if (userCredentialsBuilder_ == null) { + ensureUserCredentialsIsMutable(); + userCredentials_.add(builderForValue.build()); + onChanged(); + } else { + userCredentialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserCredentials( + int index, com.google.cloud.ftp.v1.UserCredential.Builder builderForValue) { + if (userCredentialsBuilder_ == null) { + ensureUserCredentialsIsMutable(); + userCredentials_.add(index, builderForValue.build()); + onChanged(); + } else { + userCredentialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllUserCredentials( + java.lang.Iterable values) { + if (userCredentialsBuilder_ == null) { + ensureUserCredentialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userCredentials_); + onChanged(); + } else { + userCredentialsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserCredentials() { + if (userCredentialsBuilder_ == null) { + userCredentials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + userCredentialsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeUserCredentials(int index) { + if (userCredentialsBuilder_ == null) { + ensureUserCredentialsIsMutable(); + userCredentials_.remove(index); + onChanged(); + } else { + userCredentialsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.UserCredential.Builder getUserCredentialsBuilder(int index) { + return internalGetUserCredentialsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.UserCredentialOrBuilder getUserCredentialsOrBuilder(int index) { + if (userCredentialsBuilder_ == null) { + return userCredentials_.get(index); + } else { + return userCredentialsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getUserCredentialsOrBuilderList() { + if (userCredentialsBuilder_ != null) { + return userCredentialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userCredentials_); + } + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.UserCredential.Builder addUserCredentialsBuilder() { + return internalGetUserCredentialsFieldBuilder() + .addBuilder(com.google.cloud.ftp.v1.UserCredential.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.UserCredential.Builder addUserCredentialsBuilder(int index) { + return internalGetUserCredentialsFieldBuilder() + .addBuilder(index, com.google.cloud.ftp.v1.UserCredential.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. User credential for the user.
+     * The maximum number of user credentials is 10.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getUserCredentialsBuilderList() { + return internalGetUserCredentialsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.UserCredential, + com.google.cloud.ftp.v1.UserCredential.Builder, + com.google.cloud.ftp.v1.UserCredentialOrBuilder> + internalGetUserCredentialsFieldBuilder() { + if (userCredentialsBuilder_ == null) { + userCredentialsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.UserCredential, + com.google.cloud.ftp.v1.UserCredential.Builder, + com.google.cloud.ftp.v1.UserCredentialOrBuilder>( + userCredentials_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + userCredentials_ = null; + } + return userCredentialsBuilder_; + } + + private java.util.List + storageDirectoryMappings_ = java.util.Collections.emptyList(); + + private void ensureStorageDirectoryMappingsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + storageDirectoryMappings_ = + new java.util.ArrayList( + storageDirectoryMappings_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.StorageDirectoryMapping, + com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder, + com.google.cloud.ftp.v1.StorageDirectoryMappingOrBuilder> + storageDirectoryMappingsBuilder_; + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getStorageDirectoryMappingsList() { + if (storageDirectoryMappingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(storageDirectoryMappings_); + } else { + return storageDirectoryMappingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getStorageDirectoryMappingsCount() { + if (storageDirectoryMappingsBuilder_ == null) { + return storageDirectoryMappings_.size(); + } else { + return storageDirectoryMappingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.StorageDirectoryMapping getStorageDirectoryMappings(int index) { + if (storageDirectoryMappingsBuilder_ == null) { + return storageDirectoryMappings_.get(index); + } else { + return storageDirectoryMappingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStorageDirectoryMappings( + int index, com.google.cloud.ftp.v1.StorageDirectoryMapping value) { + if (storageDirectoryMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.set(index, value); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStorageDirectoryMappings( + int index, com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder builderForValue) { + if (storageDirectoryMappingsBuilder_ == null) { + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.set(index, builderForValue.build()); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addStorageDirectoryMappings( + com.google.cloud.ftp.v1.StorageDirectoryMapping value) { + if (storageDirectoryMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.add(value); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addStorageDirectoryMappings( + int index, com.google.cloud.ftp.v1.StorageDirectoryMapping value) { + if (storageDirectoryMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.add(index, value); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addStorageDirectoryMappings( + com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder builderForValue) { + if (storageDirectoryMappingsBuilder_ == null) { + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.add(builderForValue.build()); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addStorageDirectoryMappings( + int index, com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder builderForValue) { + if (storageDirectoryMappingsBuilder_ == null) { + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.add(index, builderForValue.build()); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllStorageDirectoryMappings( + java.lang.Iterable values) { + if (storageDirectoryMappingsBuilder_ == null) { + ensureStorageDirectoryMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, storageDirectoryMappings_); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStorageDirectoryMappings() { + if (storageDirectoryMappingsBuilder_ == null) { + storageDirectoryMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeStorageDirectoryMappings(int index) { + if (storageDirectoryMappingsBuilder_ == null) { + ensureStorageDirectoryMappingsIsMutable(); + storageDirectoryMappings_.remove(index); + onChanged(); + } else { + storageDirectoryMappingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder + getStorageDirectoryMappingsBuilder(int index) { + return internalGetStorageDirectoryMappingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.StorageDirectoryMappingOrBuilder + getStorageDirectoryMappingsOrBuilder(int index) { + if (storageDirectoryMappingsBuilder_ == null) { + return storageDirectoryMappings_.get(index); + } else { + return storageDirectoryMappingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getStorageDirectoryMappingsOrBuilderList() { + if (storageDirectoryMappingsBuilder_ != null) { + return storageDirectoryMappingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(storageDirectoryMappings_); + } + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder + addStorageDirectoryMappingsBuilder() { + return internalGetStorageDirectoryMappingsFieldBuilder() + .addBuilder(com.google.cloud.ftp.v1.StorageDirectoryMapping.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder + addStorageDirectoryMappingsBuilder(int index) { + return internalGetStorageDirectoryMappingsFieldBuilder() + .addBuilder(index, com.google.cloud.ftp.v1.StorageDirectoryMapping.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Mapping of Cloud Storage buckets to directories where the user
+     * will land in the SFTP server.
+     * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getStorageDirectoryMappingsBuilderList() { + return internalGetStorageDirectoryMappingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.StorageDirectoryMapping, + com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder, + com.google.cloud.ftp.v1.StorageDirectoryMappingOrBuilder> + internalGetStorageDirectoryMappingsFieldBuilder() { + if (storageDirectoryMappingsBuilder_ == null) { + storageDirectoryMappingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.ftp.v1.StorageDirectoryMapping, + com.google.cloud.ftp.v1.StorageDirectoryMapping.Builder, + com.google.cloud.ftp.v1.StorageDirectoryMappingOrBuilder>( + storageDirectoryMappings_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + storageDirectoryMappings_ = null; + } + return storageDirectoryMappingsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.User) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.User) + private static final com.google.cloud.ftp.v1.User DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.User(); + } + + public static com.google.cloud.ftp.v1.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public User parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserCredential.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserCredential.java new file mode 100644 index 000000000000..601b6724d1ec --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserCredential.java @@ -0,0 +1,1107 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * Message describing UserCredential object
+ * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.UserCredential} + */ +@com.google.protobuf.Generated +public final class UserCredential extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.ftp.v1.UserCredential) + UserCredentialOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UserCredential"); + } + + // Use UserCredential.newBuilder() to construct. + private UserCredential(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UserCredential() { + credentialName_ = ""; + credentialType_ = 0; + sshPublicKeyBody_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UserCredential_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UserCredential_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.UserCredential.class, + com.google.cloud.ftp.v1.UserCredential.Builder.class); + } + + /** + * + * + *
+   * Type of credential.
+   * 
+ * + * Protobuf enum {@code google.cloud.ftp.v1.UserCredential.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Public key credential.
+     * 
+ * + * PUBLIC_KEY = 1; + */ + PUBLIC_KEY(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+     * Type unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Public key credential.
+     * 
+ * + * PUBLIC_KEY = 1; + */ + public static final int PUBLIC_KEY_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return PUBLIC_KEY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.ftp.v1.UserCredential.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.ftp.v1.UserCredential.Type) + } + + public static final int CREDENTIAL_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object credentialName_ = ""; + + /** + * + * + *
+   * Required. Name of the user credential.
+   * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The credentialName. + */ + @java.lang.Override + public java.lang.String getCredentialName() { + java.lang.Object ref = credentialName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + credentialName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the user credential.
+   * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for credentialName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCredentialNameBytes() { + java.lang.Object ref = credentialName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + credentialName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREDENTIAL_TYPE_FIELD_NUMBER = 2; + private int credentialType_ = 0; + + /** + * + * + *
+   * Required. Type of credential.
+   * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for credentialType. + */ + @java.lang.Override + public int getCredentialTypeValue() { + return credentialType_; + } + + /** + * + * + *
+   * Required. Type of credential.
+   * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The credentialType. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserCredential.Type getCredentialType() { + com.google.cloud.ftp.v1.UserCredential.Type result = + com.google.cloud.ftp.v1.UserCredential.Type.forNumber(credentialType_); + return result == null ? com.google.cloud.ftp.v1.UserCredential.Type.UNRECOGNIZED : result; + } + + public static final int SSH_PUBLIC_KEY_BODY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sshPublicKeyBody_ = ""; + + /** + * + * + *
+   * Optional. SSH public key body in OpenSSH format.
+   * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+   * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sshPublicKeyBody. + */ + @java.lang.Override + public java.lang.String getSshPublicKeyBody() { + java.lang.Object ref = sshPublicKeyBody_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sshPublicKeyBody_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. SSH public key body in OpenSSH format.
+   * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+   * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sshPublicKeyBody. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSshPublicKeyBodyBytes() { + java.lang.Object ref = sshPublicKeyBody_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sshPublicKeyBody_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(credentialName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, credentialName_); + } + if (credentialType_ + != com.google.cloud.ftp.v1.UserCredential.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, credentialType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sshPublicKeyBody_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sshPublicKeyBody_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(credentialName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, credentialName_); + } + if (credentialType_ + != com.google.cloud.ftp.v1.UserCredential.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, credentialType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sshPublicKeyBody_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sshPublicKeyBody_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.ftp.v1.UserCredential)) { + return super.equals(obj); + } + com.google.cloud.ftp.v1.UserCredential other = (com.google.cloud.ftp.v1.UserCredential) obj; + + if (!getCredentialName().equals(other.getCredentialName())) return false; + if (credentialType_ != other.credentialType_) return false; + if (!getSshPublicKeyBody().equals(other.getSshPublicKeyBody())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CREDENTIAL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCredentialName().hashCode(); + hash = (37 * hash) + CREDENTIAL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + credentialType_; + hash = (37 * hash) + SSH_PUBLIC_KEY_BODY_FIELD_NUMBER; + hash = (53 * hash) + getSshPublicKeyBody().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UserCredential parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UserCredential parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.ftp.v1.UserCredential parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.ftp.v1.UserCredential prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing UserCredential object
+   * 
+ * + * Protobuf type {@code google.cloud.ftp.v1.UserCredential} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.ftp.v1.UserCredential) + com.google.cloud.ftp.v1.UserCredentialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UserCredential_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UserCredential_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.ftp.v1.UserCredential.class, + com.google.cloud.ftp.v1.UserCredential.Builder.class); + } + + // Construct using com.google.cloud.ftp.v1.UserCredential.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + credentialName_ = ""; + credentialType_ = 0; + sshPublicKeyBody_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.ftp.v1.ServiceProto + .internal_static_google_cloud_ftp_v1_UserCredential_descriptor; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UserCredential getDefaultInstanceForType() { + return com.google.cloud.ftp.v1.UserCredential.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UserCredential build() { + com.google.cloud.ftp.v1.UserCredential result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UserCredential buildPartial() { + com.google.cloud.ftp.v1.UserCredential result = + new com.google.cloud.ftp.v1.UserCredential(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.ftp.v1.UserCredential result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.credentialName_ = credentialName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.credentialType_ = credentialType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sshPublicKeyBody_ = sshPublicKeyBody_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.ftp.v1.UserCredential) { + return mergeFrom((com.google.cloud.ftp.v1.UserCredential) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.ftp.v1.UserCredential other) { + if (other == com.google.cloud.ftp.v1.UserCredential.getDefaultInstance()) return this; + if (!other.getCredentialName().isEmpty()) { + credentialName_ = other.credentialName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.credentialType_ != 0) { + setCredentialTypeValue(other.getCredentialTypeValue()); + } + if (!other.getSshPublicKeyBody().isEmpty()) { + sshPublicKeyBody_ = other.sshPublicKeyBody_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + credentialName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + credentialType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + sshPublicKeyBody_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object credentialName_ = ""; + + /** + * + * + *
+     * Required. Name of the user credential.
+     * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The credentialName. + */ + public java.lang.String getCredentialName() { + java.lang.Object ref = credentialName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + credentialName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the user credential.
+     * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for credentialName. + */ + public com.google.protobuf.ByteString getCredentialNameBytes() { + java.lang.Object ref = credentialName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + credentialName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the user credential.
+     * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The credentialName to set. + * @return This builder for chaining. + */ + public Builder setCredentialName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + credentialName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the user credential.
+     * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCredentialName() { + credentialName_ = getDefaultInstance().getCredentialName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the user credential.
+     * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for credentialName to set. + * @return This builder for chaining. + */ + public Builder setCredentialNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + credentialName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int credentialType_ = 0; + + /** + * + * + *
+     * Required. Type of credential.
+     * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for credentialType. + */ + @java.lang.Override + public int getCredentialTypeValue() { + return credentialType_; + } + + /** + * + * + *
+     * Required. Type of credential.
+     * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for credentialType to set. + * @return This builder for chaining. + */ + public Builder setCredentialTypeValue(int value) { + credentialType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Type of credential.
+     * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The credentialType. + */ + @java.lang.Override + public com.google.cloud.ftp.v1.UserCredential.Type getCredentialType() { + com.google.cloud.ftp.v1.UserCredential.Type result = + com.google.cloud.ftp.v1.UserCredential.Type.forNumber(credentialType_); + return result == null ? com.google.cloud.ftp.v1.UserCredential.Type.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. Type of credential.
+     * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The credentialType to set. + * @return This builder for chaining. + */ + public Builder setCredentialType(com.google.cloud.ftp.v1.UserCredential.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + credentialType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Type of credential.
+     * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearCredentialType() { + bitField0_ = (bitField0_ & ~0x00000002); + credentialType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sshPublicKeyBody_ = ""; + + /** + * + * + *
+     * Optional. SSH public key body in OpenSSH format.
+     * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+     * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sshPublicKeyBody. + */ + public java.lang.String getSshPublicKeyBody() { + java.lang.Object ref = sshPublicKeyBody_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sshPublicKeyBody_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. SSH public key body in OpenSSH format.
+     * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+     * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sshPublicKeyBody. + */ + public com.google.protobuf.ByteString getSshPublicKeyBodyBytes() { + java.lang.Object ref = sshPublicKeyBody_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sshPublicKeyBody_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. SSH public key body in OpenSSH format.
+     * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+     * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sshPublicKeyBody to set. + * @return This builder for chaining. + */ + public Builder setSshPublicKeyBody(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sshPublicKeyBody_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. SSH public key body in OpenSSH format.
+     * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+     * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSshPublicKeyBody() { + sshPublicKeyBody_ = getDefaultInstance().getSshPublicKeyBody(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. SSH public key body in OpenSSH format.
+     * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+     * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sshPublicKeyBody to set. + * @return This builder for chaining. + */ + public Builder setSshPublicKeyBodyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sshPublicKeyBody_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.ftp.v1.UserCredential) + } + + // @@protoc_insertion_point(class_scope:google.cloud.ftp.v1.UserCredential) + private static final com.google.cloud.ftp.v1.UserCredential DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.ftp.v1.UserCredential(); + } + + public static com.google.cloud.ftp.v1.UserCredential getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserCredential parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.ftp.v1.UserCredential getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserCredentialOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserCredentialOrBuilder.java new file mode 100644 index 000000000000..7becd56ca64d --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserCredentialOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface UserCredentialOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.UserCredential) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the user credential.
+   * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The credentialName. + */ + java.lang.String getCredentialName(); + + /** + * + * + *
+   * Required. Name of the user credential.
+   * 
+ * + * string credential_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for credentialName. + */ + com.google.protobuf.ByteString getCredentialNameBytes(); + + /** + * + * + *
+   * Required. Type of credential.
+   * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for credentialType. + */ + int getCredentialTypeValue(); + + /** + * + * + *
+   * Required. Type of credential.
+   * 
+ * + * + * .google.cloud.ftp.v1.UserCredential.Type credential_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The credentialType. + */ + com.google.cloud.ftp.v1.UserCredential.Type getCredentialType(); + + /** + * + * + *
+   * Optional. SSH public key body in OpenSSH format.
+   * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+   * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sshPublicKeyBody. + */ + java.lang.String getSshPublicKeyBody(); + + /** + * + * + *
+   * Optional. SSH public key body in OpenSSH format.
+   * Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
+   * 
+ * + * string ssh_public_key_body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sshPublicKeyBody. + */ + com.google.protobuf.ByteString getSshPublicKeyBodyBytes(); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserName.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserName.java new file mode 100644 index 000000000000..d8e17450bbc1 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserName.java @@ -0,0 +1,260 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class UserName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SERVER_USER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/servers/{server}/users/{user}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String server; + private final String user; + + @Deprecated + protected UserName() { + project = null; + location = null; + server = null; + user = null; + } + + private UserName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + server = Preconditions.checkNotNull(builder.getServer()); + user = Preconditions.checkNotNull(builder.getUser()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getServer() { + return server; + } + + public String getUser() { + return user; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static UserName of(String project, String location, String server, String user) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setServer(server) + .setUser(user) + .build(); + } + + public static String format(String project, String location, String server, String user) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setServer(server) + .setUser(user) + .build() + .toString(); + } + + public static @Nullable UserName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SERVER_USER.validatedMatch( + formattedString, "UserName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("server"), + matchMap.get("user")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable UserName> values) { + List list = new ArrayList<>(values.size()); + for (UserName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SERVER_USER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (server != null) { + fieldMapBuilder.put("server", server); + } + if (user != null) { + fieldMapBuilder.put("user", user); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SERVER_USER.instantiate( + "project", project, "location", location, "server", server, "user", user); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + UserName that = ((UserName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.server, that.server) + && Objects.equals(this.user, that.user); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(server); + h *= 1000003; + h ^= Objects.hashCode(user); + return h; + } + + /** Builder for projects/{project}/locations/{location}/servers/{server}/users/{user}. */ + public static class Builder { + private String project; + private String location; + private String server; + private String user; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getServer() { + return server; + } + + public String getUser() { + return user; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setServer(String server) { + this.server = server; + return this; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + private Builder(UserName userName) { + this.project = userName.project; + this.location = userName.location; + this.server = userName.server; + this.user = userName.user; + } + + public UserName build() { + return new UserName(this); + } + } +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserOrBuilder.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserOrBuilder.java new file mode 100644 index 000000000000..506fcc6e1348 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserOrBuilder.java @@ -0,0 +1,422 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +@com.google.protobuf.Generated +public interface UserOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.ftp.v1.User) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. User-friendly name via which User will be identified.
+   * projects/{project}/locations/{location}/servers/{server}/users/{user}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. User-friendly name via which User will be identified.
+   * projects/{project}/locations/{location}/servers/{server}/users/{user}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. [Output only] The username of the user.
+   * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The username. + */ + java.lang.String getUsername(); + + /** + * + * + *
+   * Output only. [Output only] The username of the user.
+   * 
+ * + * string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for username. + */ + com.google.protobuf.ByteString getUsernameBytes(); + + /** + * + * + *
+   * Required. Service account in customer project attached to this SFTP User.
+   * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customerServiceAccount. + */ + java.lang.String getCustomerServiceAccount(); + + /** + * + * + *
+   * Required. Service account in customer project attached to this SFTP User.
+   * 
+ * + * string customer_service_account = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customerServiceAccount. + */ + com.google.protobuf.ByteString getCustomerServiceAccountBytes(); + + /** + * + * + *
+   * Output only. Tracks user creation.
+   * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. Tracks user creation.
+   * 
+ * + * .google.cloud.ftp.v1.User.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.ftp.v1.User.State getState(); + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getUserCredentialsList(); + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ftp.v1.UserCredential getUserCredentials(int index); + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getUserCredentialsCount(); + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getUserCredentialsOrBuilderList(); + + /** + * + * + *
+   * Required. User credential for the user.
+   * The maximum number of user credentials is 10.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.UserCredential user_credentials = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ftp.v1.UserCredentialOrBuilder getUserCredentialsOrBuilder(int index); + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getStorageDirectoryMappingsList(); + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ftp.v1.StorageDirectoryMapping getStorageDirectoryMappings(int index); + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getStorageDirectoryMappingsCount(); + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getStorageDirectoryMappingsOrBuilderList(); + + /** + * + * + *
+   * Required. Mapping of Cloud Storage buckets to directories where the user
+   * will land in the SFTP server.
+   * 
+ * + * + * repeated .google.cloud.ftp.v1.StorageDirectoryMapping storage_directory_mappings = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.ftp.v1.StorageDirectoryMappingOrBuilder getStorageDirectoryMappingsOrBuilder( + int index); +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserView.java b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserView.java new file mode 100644 index 000000000000..4b74367d3db2 --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/java/com/google/cloud/ftp/v1/UserView.java @@ -0,0 +1,193 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/ftp/v1/service.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.ftp.v1; + +/** + * + * + *
+ * View for User resource.
+ * 
+ * + * Protobuf enum {@code google.cloud.ftp.v1.UserView} + */ +@com.google.protobuf.Generated +public enum UserView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value. Equivalent to USER_VIEW_BASIC.
+   * 
+ * + * USER_VIEW_UNSPECIFIED = 0; + */ + USER_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Basic view. Excludes heavy configurations (user_credentials,
+   * storage_directory_mappings).
+   * 
+ * + * USER_VIEW_BASIC = 1; + */ + USER_VIEW_BASIC(1), + /** + * + * + *
+   * Full view. Includes all fields.
+   * 
+ * + * USER_VIEW_FULL = 2; + */ + USER_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UserView"); + } + + /** + * + * + *
+   * Default value. Equivalent to USER_VIEW_BASIC.
+   * 
+ * + * USER_VIEW_UNSPECIFIED = 0; + */ + public static final int USER_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Basic view. Excludes heavy configurations (user_credentials,
+   * storage_directory_mappings).
+   * 
+ * + * USER_VIEW_BASIC = 1; + */ + public static final int USER_VIEW_BASIC_VALUE = 1; + + /** + * + * + *
+   * Full view. Includes all fields.
+   * 
+ * + * USER_VIEW_FULL = 2; + */ + public static final int USER_VIEW_FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UserView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static UserView forNumber(int value) { + switch (value) { + case 0: + return USER_VIEW_UNSPECIFIED; + case 1: + return USER_VIEW_BASIC; + case 2: + return USER_VIEW_FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UserView findValueByNumber(int number) { + return UserView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.ftp.v1.ServiceProto.getDescriptor().getEnumTypes().get(1); + } + + private static final UserView[] VALUES = values(); + + public static UserView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UserView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.ftp.v1.UserView) +} diff --git a/java-ftp/proto-google-cloud-ftp-v1/src/main/proto/google/cloud/ftp/v1/service.proto b/java-ftp/proto-google-cloud-ftp-v1/src/main/proto/google/cloud/ftp/v1/service.proto new file mode 100644 index 000000000000..9b3763d0aeef --- /dev/null +++ b/java-ftp/proto-google-cloud-ftp-v1/src/main/proto/google/cloud/ftp/v1/service.proto @@ -0,0 +1,854 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.ftp.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Ftp.V1"; +option go_package = "cloud.google.com/go/ftp/apiv1/ftppb;ftppb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.ftp.v1"; +option php_namespace = "Google\\Cloud\\Ftp\\V1"; +option ruby_package = "Google::Cloud::Ftp::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/ForwardingRule" + pattern: "projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/ServiceAttachment" + pattern: "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}" +}; + +// Service describing handlers for resources +service CloudFtp { + option (google.api.default_host) = "ftp.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Servers in a given project and location. + rpc ListServers(ListServersRequest) returns (ListServersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/servers" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Server. + rpc GetServer(GetServerRequest) returns (Server) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/servers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Server in a given project and location. + rpc CreateServer(CreateServerRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/servers" + body: "server" + }; + option (google.api.method_signature) = "parent,server,server_id"; + option (google.longrunning.operation_info) = { + response_type: "Server" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Server. + rpc UpdateServer(UpdateServerRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{server.name=projects/*/locations/*/servers/*}" + body: "server" + }; + option (google.api.method_signature) = "server,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Server" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Server. + rpc DeleteServer(DeleteServerRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/servers/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Users in a given project and location. + rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/servers/*}/users" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single User. + rpc GetUser(GetUserRequest) returns (User) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/servers/*/users/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new User in a given project and location and Server. + rpc CreateUser(CreateUserRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/servers/*}/users" + body: "user" + }; + option (google.api.method_signature) = "parent,user,user_id"; + option (google.longrunning.operation_info) = { + response_type: "User" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single User. + rpc UpdateUser(UpdateUserRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{user.name=projects/*/locations/*/servers/*/users/*}" + body: "user" + }; + option (google.api.method_signature) = "user,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "User" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single User. + rpc DeleteUser(DeleteUserRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/servers/*/users/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Starts a stopping/stopped Server. + rpc StartServer(StartServerRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/servers/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Server" + metadata_type: "OperationMetadata" + }; + } + + // Stops an active Server. + rpc StopServer(StopServerRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/servers/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Server" + metadata_type: "OperationMetadata" + }; + } +} + +// View for Server resource. +enum ServerView { + // Default value. Equivalent to SERVER_VIEW_BASIC. + SERVER_VIEW_UNSPECIFIED = 0; + + // Basic view. Excludes heavy configurations (internal_config, + // external_config, google_managed_server_credential). + SERVER_VIEW_BASIC = 1; + + // Full view. Includes all fields. + SERVER_VIEW_FULL = 2; +} + +// View for User resource. +enum UserView { + // Default value. Equivalent to USER_VIEW_BASIC. + USER_VIEW_UNSPECIFIED = 0; + + // Basic view. Excludes heavy configurations (user_credentials, + // storage_directory_mappings). + USER_VIEW_BASIC = 1; + + // Full view. Includes all fields. + USER_VIEW_FULL = 2; +} + +// Configuration for external server. +message ExternalServerConfig { + // Output only. IP address of the LB via which clients will connect. + string ip_address = 1 [ + (google.api.field_info).format = IPV4_OR_IPV6, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. List of CIDR blocks that are allowed to access the Server. + // A CIDR range consists of an IP Address and a prefix length to construct the + // subnet mask. By default, the prefix length is 32 (i.e. matches a single IP + // address). For now, only IPV4 addresses are supported. + // Examples: "203.0.113.0/24" - + // matches with the IP addresses in the range 203.0.113.0 - 203.0.113.255. + // "0.0.0.0/0" - matches against any IP address. + // This field must contain at least one entry if the access type is EXTERNAL. + // The number of allowed CIDR blocks cannot exceed 500. + // Example: 192.168.0.0/16 + repeated string allowed_cidr_blocks = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for private server accessible via PSC. +message InternalServerConfig { + // A consumer project or network that is permitted to connect to the server + // via PSC. + message AllowedConsumer { + // Required. Specifies the type of consumer. + oneof consumer_type { + // The project ID or number of the consumer project. + // Must be in the format: `projects/{project}`. + string project = 1 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + }]; + } + + // Required. The connection limit for the consumer. + // Value must be greater than 0. + int64 connection_limit = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A consumer project or network that is denied to connect to the server via + // PSC. + message DeniedConsumer { + // Required. Specifies the type of consumer. + oneof consumer_type { + // The project ID or number of the consumer project. + // Must be in the format: `projects/{project}`. + string project = 1 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + }]; + } + } + + // Details of PSC endpoint created by customer. + message PscEndpoint { + // Output only. This is a Resource name for Private Service Connect + // endpoint. Format: + // `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}` + string endpoint = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "compute.googleapis.com/ForwardingRule" + } + ]; + + // Output only. The consumer network. + // Format: `projects/{project}/locations/{location}/networks/{network}` + string network = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Network" + } + ]; + + // Output only. The status of the connected endpoint. + string status = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the service attachment. + // Format: + // `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}` + string service_attachment = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "compute.googleapis.com/ServiceAttachment" + } + ]; + + // Required. A list of projects that are permitted to connect. + // At least one project is required in the allow list. + repeated AllowedConsumer consumer_accept_list = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of projects that are denied connection. + // Format: "projects/sample_project_id" or "projects/1234567890" + // Projects in this list will be denied access, even if they are included in + // the `allow_list`. If this list is empty, no projects are explicitly + // rejected. + repeated DeniedConsumer consumer_reject_list = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Details of endpoints created by the customer. + repeated PscEndpoint psc_endpoints = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents credentials of an FTP Server. +message ServerCredential { + // Output only. The fingerprint is a hash of the public key, and is displayed + // when clients access the server for the first time to verify the server's + // identity. + string fingerprint = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Asymmetric algorithm used by the public key. + // Possible values (can be expanded in future): + // - ssh-ed25519 + string asymmetric_algorithm = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message describing Server object +message Server { + option (google.api.resource) = { + type: "ftp.googleapis.com/Server" + pattern: "projects/{project}/locations/{location}/servers/{server}" + plural: "servers" + singular: "server" + }; + + // The access type of the Server. + enum AccessType { + // Default value. This value is unused. + ACCESS_TYPE_UNSPECIFIED = 0; + + // Server is assigned a public IP. + EXTERNAL = 1; + + // Server is assigned an internal IP. + INTERNAL = 2; + } + + // Tracks Server status. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // Server is being created. + CREATING = 1; + + // Server is starting. + STARTING = 2; + + // Server is ready to be used. + ACTIVE = 3; + + // Server is stopping. + STOPPING = 4; + + // Server is stopped. + STOPPED = 5; + + // Server is being deleted. + DELETING = 6; + + // Server is in error state. + ERROR = 7; + + // Server is being updated. + UPDATING = 8; + } + + // Configuration for server access. + // If this is set, it must match the value in the `access_type` field. + oneof access_config { + // Configuration for external access. + ExternalServerConfig external_config = 7; + + // Configuration for internal access. + InternalServerConfig internal_config = 8; + } + + // Identifier. name of resource + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. [Output only] Create time stamp + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update time stamp + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels as key value pairs + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Display name of the Server + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The access type of the Server. + AccessType access_type = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The state of the server. + State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Credentials of the FTP Server. + ServerCredential google_managed_server_credential = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service agent used to access the customer bucket. + string service_agent = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for requesting list of Servers +message ListServersRequest { + // Required. Parent value for ListServersRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "ftp.googleapis.com/Server" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The view of the Server resource to return. + ServerView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Servers +message ListServersResponse { + // The list of Server + repeated Server servers = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for getting a Server +message GetServerRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ftp.googleapis.com/Server" } + ]; + + // Optional. The view of the Server resource to return. + ServerView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for creating a Server +message CreateServerRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "ftp.googleapis.com/Server" + } + ]; + + // Required. A unique ID for the server. Must start with a lowercase letter, + // and end with a lowercase letter or number. Can contain lowercase letters, + // numbers, and hyphens. Maximum length is 30 characters. + string server_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + Server server = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a Server +message UpdateServerRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Server resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields present in the request will be + // overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated + Server server = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Server +// Note: Cascading delete is not supported. Any nested User resources +// under this Server must be deleted before the Server itself can be deleted. +// Attempting to delete a Server with active User resources will result in an +// error. +message DeleteServerRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ftp.googleapis.com/Server" } + ]; +} + +// Mapping of backing Cloud Storage path to the directory where the user lands +// in the SFTP server. If directory is not specified, it'll default to '/'. +// +// Eg 1 - +// (bucket_name: bucket, bucket_prefix: path1/path2, directory: +// /abc/def/username) +// +// The user will land at /abcd/def/username, and the view there will match that +// of /bucket/path1/path2. The user will not be aware of Cloud Storage prefix +// '/bucket/path1' and there will be no such directory in the view. +// +// Eg 2 - +// (bucket_name: bucket, bucket_prefix: path1/path2, directory: '') +// +// The user will land at '/', and the view there will match +// that of /bucket/path1/path2. The user will not be aware of Cloud Storage +// prefix '/bucket/path1/path2' and there will be no such directory in the view. +message StorageDirectoryMapping { + // Tracks read/write access to the bucket. + enum Permission { + // Permission unspecified. + PERMISSION_UNSPECIFIED = 0; + + // Read only permission. + READ_ONLY = 1; + + // Read write permission. + READ_WRITE = 2; + } + + // Required. Name of the bucket. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Prefix inside the bucket. + string bucket_prefix = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Directory where the user lands in the SFTP server. + string directory = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Permission to the bucket. + Permission permission = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Message describing User object +message User { + option (google.api.resource) = { + type: "ftp.googleapis.com/User" + pattern: "projects/{project}/locations/{location}/servers/{server}/users/{user}" + plural: "users" + singular: "user" + }; + + // Tracks user creation. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // User is being created. + CREATING = 1; + + // User is ready to be used. + ACTIVE = 2; + + // User creation failed. + ERROR = 3; + + // The resource is being updated. + UPDATING = 4; + + // The resource is being deleted. + DELETING = 5; + } + + // Identifier. User-friendly name via which User will be identified. + // projects/{project}/locations/{location}/servers/{server}/users/{user} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. [Output only] Create time stamp + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update time stamp + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels as key value pairs + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. [Output only] The username of the user. + string username = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Service account in customer project attached to this SFTP User. + string customer_service_account = 7 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Tracks user creation. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. User credential for the user. + // The maximum number of user credentials is 10. + repeated UserCredential user_credentials = 9 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Mapping of Cloud Storage buckets to directories where the user + // will land in the SFTP server. + repeated StorageDirectoryMapping storage_directory_mappings = 10 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message for requesting list of Users +message ListUsersRequest { + // Required. Parent value for ListUsersRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { child_type: "ftp.googleapis.com/User" } + ]; + + // Optional. Requested page size. User may return fewer items than requested. + // The maximum value is 1000; The default value is 50 if the field is omitted + // (or set to 0). + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the user should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The view of the User resource to return. + UserView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Users +message ListUsersResponse { + // The list of User + repeated User users = 1; + + // A token identifying a page of results the user should return. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for getting a User +message GetUserRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ftp.googleapis.com/User" } + ]; + + // Optional. The view of the User resource to return. + UserView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for creating a User +message CreateUserRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { child_type: "ftp.googleapis.com/User" } + ]; + + // Required. A unique user ID for the SFTP user. The user ID must start with a + // lowercase letter and can include lowercase letters, numbers, or hyphens. + string user_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + User user = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a User +message UpdateUserRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // User resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields present in the request will be + // overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated + User user = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for deleting a User +message DeleteUserRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ftp.googleapis.com/User" } + ]; + + // Optional. If set to true, the request will force the deletion of the User. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for starting a Server. +message StartServerRequest { + // Required. Name of the resource + // Format: `projects/{project}/locations/{location}/servers/{server}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ftp.googleapis.com/Server" } + ]; +} + +// Request message for stopping a Server. +message StopServerRequest { + // Required. Name of the resource. + // Format: `projects/{project}/locations/{location}/servers/{server}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "ftp.googleapis.com/Server" } + ]; +} + +// Message describing UserCredential object +message UserCredential { + // Type of credential. + enum Type { + // Type unspecified. + TYPE_UNSPECIFIED = 0; + + // Public key credential. + PUBLIC_KEY = 1; + } + + // Required. Name of the user credential. + string credential_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Type of credential. + Type credential_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. SSH public key body in OpenSSH format. + // Example: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..." + string ssh_public_key_body = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/create/SyncCreateSetCredentialsProvider.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..668a0063b529 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.CloudFtpSettings; +import com.google.cloud.ftp.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudFtpSettings cloudFtpSettings = + CloudFtpSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CloudFtpClient cloudFtpClient = CloudFtpClient.create(cloudFtpSettings); + } +} +// [END ftp_v1_generated_CloudFtp_Create_SetCredentialsProvider_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/create/SyncCreateSetEndpoint.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..b14cd0e448c8 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_Create_SetEndpoint_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.CloudFtpSettings; +import com.google.cloud.ftp.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudFtpSettings cloudFtpSettings = + CloudFtpSettings.newBuilder().setEndpoint(myEndpoint).build(); + CloudFtpClient cloudFtpClient = CloudFtpClient.create(cloudFtpSettings); + } +} +// [END ftp_v1_generated_CloudFtp_Create_SetEndpoint_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/AsyncCreateServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/AsyncCreateServer.java new file mode 100644 index 000000000000..720af8a2fd69 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/AsyncCreateServer.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.CreateServerRequest; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; +import com.google.longrunning.Operation; + +public class AsyncCreateServer { + + public static void main(String[] args) throws Exception { + asyncCreateServer(); + } + + public static void asyncCreateServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + CreateServerRequest request = + CreateServerRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setServerId("serverId1379103678") + .setServer(Server.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = cloudFtpClient.createServerCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateServer_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/AsyncCreateServerLRO.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/AsyncCreateServerLRO.java new file mode 100644 index 000000000000..c5b31153886a --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/AsyncCreateServerLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateServer_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.CreateServerRequest; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.Server; + +public class AsyncCreateServerLRO { + + public static void main(String[] args) throws Exception { + asyncCreateServerLRO(); + } + + public static void asyncCreateServerLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + CreateServerRequest request = + CreateServerRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setServerId("serverId1379103678") + .setServer(Server.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudFtpClient.createServerOperationCallable().futureCall(request); + // Do something. + Server response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateServer_LRO_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServer.java new file mode 100644 index 000000000000..6a7f00894dee --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServer.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateServer_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.CreateServerRequest; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; + +public class SyncCreateServer { + + public static void main(String[] args) throws Exception { + syncCreateServer(); + } + + public static void syncCreateServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + CreateServerRequest request = + CreateServerRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setServerId("serverId1379103678") + .setServer(Server.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Server response = cloudFtpClient.createServerAsync(request).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServerLocationnameServerString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServerLocationnameServerString.java new file mode 100644 index 000000000000..46f6dfce2dcb --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServerLocationnameServerString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateServer_LocationnameServerString_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; + +public class SyncCreateServerLocationnameServerString { + + public static void main(String[] args) throws Exception { + syncCreateServerLocationnameServerString(); + } + + public static void syncCreateServerLocationnameServerString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Server server = Server.newBuilder().build(); + String serverId = "serverId1379103678"; + Server response = cloudFtpClient.createServerAsync(parent, server, serverId).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateServer_LocationnameServerString_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServerStringServerString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServerStringServerString.java new file mode 100644 index 000000000000..34b90f79938d --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createserver/SyncCreateServerStringServerString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateServer_StringServerString_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; + +public class SyncCreateServerStringServerString { + + public static void main(String[] args) throws Exception { + syncCreateServerStringServerString(); + } + + public static void syncCreateServerStringServerString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Server server = Server.newBuilder().build(); + String serverId = "serverId1379103678"; + Server response = cloudFtpClient.createServerAsync(parent, server, serverId).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateServer_StringServerString_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/AsyncCreateUser.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/AsyncCreateUser.java new file mode 100644 index 000000000000..1326017ec7af --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/AsyncCreateUser.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateUser_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.CreateUserRequest; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; +import com.google.longrunning.Operation; + +public class AsyncCreateUser { + + public static void main(String[] args) throws Exception { + asyncCreateUser(); + } + + public static void asyncCreateUser() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + CreateUserRequest request = + CreateUserRequest.newBuilder() + .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setUserId("userId-836030906") + .setUser(User.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = cloudFtpClient.createUserCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateUser_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/AsyncCreateUserLRO.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/AsyncCreateUserLRO.java new file mode 100644 index 000000000000..9002471114ae --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/AsyncCreateUserLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateUser_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.CreateUserRequest; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; + +public class AsyncCreateUserLRO { + + public static void main(String[] args) throws Exception { + asyncCreateUserLRO(); + } + + public static void asyncCreateUserLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + CreateUserRequest request = + CreateUserRequest.newBuilder() + .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setUserId("userId-836030906") + .setUser(User.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudFtpClient.createUserOperationCallable().futureCall(request); + // Do something. + User response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateUser_LRO_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUser.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUser.java new file mode 100644 index 000000000000..70fcd83bd9ba --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUser.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateUser_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.CreateUserRequest; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; + +public class SyncCreateUser { + + public static void main(String[] args) throws Exception { + syncCreateUser(); + } + + public static void syncCreateUser() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + CreateUserRequest request = + CreateUserRequest.newBuilder() + .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setUserId("userId-836030906") + .setUser(User.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + User response = cloudFtpClient.createUserAsync(request).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateUser_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUserServernameUserString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUserServernameUserString.java new file mode 100644 index 000000000000..bf7905041f85 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUserServernameUserString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateUser_ServernameUserString_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; + +public class SyncCreateUserServernameUserString { + + public static void main(String[] args) throws Exception { + syncCreateUserServernameUserString(); + } + + public static void syncCreateUserServernameUserString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ServerName parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + User user = User.newBuilder().build(); + String userId = "userId-836030906"; + User response = cloudFtpClient.createUserAsync(parent, user, userId).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateUser_ServernameUserString_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUserStringUserString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUserStringUserString.java new file mode 100644 index 000000000000..feed3238dcb4 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/createuser/SyncCreateUserStringUserString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_CreateUser_StringUserString_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; + +public class SyncCreateUserStringUserString { + + public static void main(String[] args) throws Exception { + syncCreateUserStringUserString(); + } + + public static void syncCreateUserStringUserString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString(); + User user = User.newBuilder().build(); + String userId = "userId-836030906"; + User response = cloudFtpClient.createUserAsync(parent, user, userId).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_CreateUser_StringUserString_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/AsyncDeleteServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/AsyncDeleteServer.java new file mode 100644 index 000000000000..d4b6d86f1ea4 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/AsyncDeleteServer.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.DeleteServerRequest; +import com.google.cloud.ftp.v1.ServerName; +import com.google.longrunning.Operation; + +public class AsyncDeleteServer { + + public static void main(String[] args) throws Exception { + asyncDeleteServer(); + } + + public static void asyncDeleteServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + DeleteServerRequest request = + DeleteServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + ApiFuture future = cloudFtpClient.deleteServerCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteServer_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/AsyncDeleteServerLRO.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/AsyncDeleteServerLRO.java new file mode 100644 index 000000000000..5c3ee1a01536 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/AsyncDeleteServerLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteServer_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.DeleteServerRequest; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.ServerName; +import com.google.protobuf.Empty; + +public class AsyncDeleteServerLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteServerLRO(); + } + + public static void asyncDeleteServerLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + DeleteServerRequest request = + DeleteServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + OperationFuture future = + cloudFtpClient.deleteServerOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteServer_LRO_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServer.java new file mode 100644 index 000000000000..121195d06d23 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServer.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteServer_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.DeleteServerRequest; +import com.google.cloud.ftp.v1.ServerName; +import com.google.protobuf.Empty; + +public class SyncDeleteServer { + + public static void main(String[] args) throws Exception { + syncDeleteServer(); + } + + public static void syncDeleteServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + DeleteServerRequest request = + DeleteServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + cloudFtpClient.deleteServerAsync(request).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServerServername.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServerServername.java new file mode 100644 index 000000000000..e80821c77546 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServerServername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteServer_Servername_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ServerName; +import com.google.protobuf.Empty; + +public class SyncDeleteServerServername { + + public static void main(String[] args) throws Exception { + syncDeleteServerServername(); + } + + public static void syncDeleteServerServername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + cloudFtpClient.deleteServerAsync(name).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteServer_Servername_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServerString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServerString.java new file mode 100644 index 000000000000..05f3617fb0f8 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteserver/SyncDeleteServerString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteServer_String_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ServerName; +import com.google.protobuf.Empty; + +public class SyncDeleteServerString { + + public static void main(String[] args) throws Exception { + syncDeleteServerString(); + } + + public static void syncDeleteServerString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString(); + cloudFtpClient.deleteServerAsync(name).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteServer_String_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/AsyncDeleteUser.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/AsyncDeleteUser.java new file mode 100644 index 000000000000..d67498093e23 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/AsyncDeleteUser.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteUser_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.DeleteUserRequest; +import com.google.cloud.ftp.v1.UserName; +import com.google.longrunning.Operation; + +public class AsyncDeleteUser { + + public static void main(String[] args) throws Exception { + asyncDeleteUser(); + } + + public static void asyncDeleteUser() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + DeleteUserRequest request = + DeleteUserRequest.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setForce(true) + .build(); + ApiFuture future = cloudFtpClient.deleteUserCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteUser_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/AsyncDeleteUserLRO.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/AsyncDeleteUserLRO.java new file mode 100644 index 000000000000..2d47df28c493 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/AsyncDeleteUserLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteUser_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.DeleteUserRequest; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.UserName; +import com.google.protobuf.Empty; + +public class AsyncDeleteUserLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteUserLRO(); + } + + public static void asyncDeleteUserLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + DeleteUserRequest request = + DeleteUserRequest.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setForce(true) + .build(); + OperationFuture future = + cloudFtpClient.deleteUserOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteUser_LRO_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUser.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUser.java new file mode 100644 index 000000000000..d63aa08d624f --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUser.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteUser_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.DeleteUserRequest; +import com.google.cloud.ftp.v1.UserName; +import com.google.protobuf.Empty; + +public class SyncDeleteUser { + + public static void main(String[] args) throws Exception { + syncDeleteUser(); + } + + public static void syncDeleteUser() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + DeleteUserRequest request = + DeleteUserRequest.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setForce(true) + .build(); + cloudFtpClient.deleteUserAsync(request).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteUser_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUserString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUserString.java new file mode 100644 index 000000000000..9c7e7edb4796 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUserString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteUser_String_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.UserName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserString { + + public static void main(String[] args) throws Exception { + syncDeleteUserString(); + } + + public static void syncDeleteUserString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString(); + cloudFtpClient.deleteUserAsync(name).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteUser_String_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUserUsername.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUserUsername.java new file mode 100644 index 000000000000..541fc2f45baf --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/deleteuser/SyncDeleteUserUsername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_DeleteUser_Username_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.UserName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserUsername { + + public static void main(String[] args) throws Exception { + syncDeleteUserUsername(); + } + + public static void syncDeleteUserUsername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]"); + cloudFtpClient.deleteUserAsync(name).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_DeleteUser_Username_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getlocation/AsyncGetLocation.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..5753418d511c --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = cloudFtpClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetLocation_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getlocation/SyncGetLocation.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..6688a7441fbb --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetLocation_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudFtpClient.getLocation(request); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetLocation_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/AsyncGetServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/AsyncGetServer.java new file mode 100644 index 000000000000..a0cbf16288ae --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/AsyncGetServer.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.GetServerRequest; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.ServerView; + +public class AsyncGetServer { + + public static void main(String[] args) throws Exception { + asyncGetServer(); + } + + public static void asyncGetServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + GetServerRequest request = + GetServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setView(ServerView.forNumber(0)) + .build(); + ApiFuture future = cloudFtpClient.getServerCallable().futureCall(request); + // Do something. + Server response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetServer_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServer.java new file mode 100644 index 000000000000..50c04b939ef3 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServer.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetServer_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.GetServerRequest; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.ServerView; + +public class SyncGetServer { + + public static void main(String[] args) throws Exception { + syncGetServer(); + } + + public static void syncGetServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + GetServerRequest request = + GetServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setView(ServerView.forNumber(0)) + .build(); + Server response = cloudFtpClient.getServer(request); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServerServername.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServerServername.java new file mode 100644 index 000000000000..5fff32ff4430 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServerServername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetServer_Servername_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; + +public class SyncGetServerServername { + + public static void main(String[] args) throws Exception { + syncGetServerServername(); + } + + public static void syncGetServerServername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + Server response = cloudFtpClient.getServer(name); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetServer_Servername_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServerString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServerString.java new file mode 100644 index 000000000000..c3022b743915 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getserver/SyncGetServerString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetServer_String_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; + +public class SyncGetServerString { + + public static void main(String[] args) throws Exception { + syncGetServerString(); + } + + public static void syncGetServerString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString(); + Server response = cloudFtpClient.getServer(name); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetServer_String_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/AsyncGetUser.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/AsyncGetUser.java new file mode 100644 index 000000000000..49e4688ad1db --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/AsyncGetUser.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetUser_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.GetUserRequest; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.ftp.v1.UserName; +import com.google.cloud.ftp.v1.UserView; + +public class AsyncGetUser { + + public static void main(String[] args) throws Exception { + asyncGetUser(); + } + + public static void asyncGetUser() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + GetUserRequest request = + GetUserRequest.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setView(UserView.forNumber(0)) + .build(); + ApiFuture future = cloudFtpClient.getUserCallable().futureCall(request); + // Do something. + User response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetUser_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUser.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUser.java new file mode 100644 index 000000000000..2ef691718615 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUser.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetUser_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.GetUserRequest; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.ftp.v1.UserName; +import com.google.cloud.ftp.v1.UserView; + +public class SyncGetUser { + + public static void main(String[] args) throws Exception { + syncGetUser(); + } + + public static void syncGetUser() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + GetUserRequest request = + GetUserRequest.newBuilder() + .setName(UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString()) + .setView(UserView.forNumber(0)) + .build(); + User response = cloudFtpClient.getUser(request); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetUser_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUserString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUserString.java new file mode 100644 index 000000000000..94e86f78c368 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUserString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetUser_String_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.ftp.v1.UserName; + +public class SyncGetUserString { + + public static void main(String[] args) throws Exception { + syncGetUserString(); + } + + public static void syncGetUserString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]").toString(); + User response = cloudFtpClient.getUser(name); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetUser_String_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUserUsername.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUserUsername.java new file mode 100644 index 000000000000..fcd9aa91a339 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/getuser/SyncGetUserUsername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_GetUser_Username_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.ftp.v1.UserName; + +public class SyncGetUserUsername { + + public static void main(String[] args) throws Exception { + syncGetUserUsername(); + } + + public static void syncGetUserUsername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[SERVER]", "[USER]"); + User response = cloudFtpClient.getUser(name); + } + } +} +// [END ftp_v1_generated_CloudFtp_GetUser_Username_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/AsyncListLocations.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..47f73f05ffa7 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = cloudFtpClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListLocations_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/AsyncListLocationsPaged.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..26909da6925c --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListLocations_Paged_async] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = cloudFtpClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListLocations_Paged_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/SyncListLocations.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..4e8a4b28aaa0 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListLocations_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudFtpClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListLocations_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/AsyncListServers.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/AsyncListServers.java new file mode 100644 index 000000000000..9df5a25fd607 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/AsyncListServers.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListServers_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ListServersRequest; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerView; + +public class AsyncListServers { + + public static void main(String[] args) throws Exception { + asyncListServers(); + } + + public static void asyncListServers() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListServersRequest request = + ListServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ServerView.forNumber(0)) + .build(); + ApiFuture future = cloudFtpClient.listServersPagedCallable().futureCall(request); + // Do something. + for (Server element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListServers_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/AsyncListServersPaged.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/AsyncListServersPaged.java new file mode 100644 index 000000000000..6c800ee5b7af --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/AsyncListServersPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListServers_Paged_async] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ListServersRequest; +import com.google.cloud.ftp.v1.ListServersResponse; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerView; +import com.google.common.base.Strings; + +public class AsyncListServersPaged { + + public static void main(String[] args) throws Exception { + asyncListServersPaged(); + } + + public static void asyncListServersPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListServersRequest request = + ListServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ServerView.forNumber(0)) + .build(); + while (true) { + ListServersResponse response = cloudFtpClient.listServersCallable().call(request); + for (Server element : response.getServersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListServers_Paged_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServers.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServers.java new file mode 100644 index 000000000000..be851cd8fa7b --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServers.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListServers_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ListServersRequest; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerView; + +public class SyncListServers { + + public static void main(String[] args) throws Exception { + syncListServers(); + } + + public static void syncListServers() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListServersRequest request = + ListServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(ServerView.forNumber(0)) + .build(); + for (Server element : cloudFtpClient.listServers(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListServers_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServersLocationname.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServersLocationname.java new file mode 100644 index 000000000000..c726088527af --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServersLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListServers_Locationname_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; + +public class SyncListServersLocationname { + + public static void main(String[] args) throws Exception { + syncListServersLocationname(); + } + + public static void syncListServersLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Server element : cloudFtpClient.listServers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListServers_Locationname_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServersString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServersString.java new file mode 100644 index 000000000000..dce867e0919d --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listservers/SyncListServersString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListServers_String_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.LocationName; +import com.google.cloud.ftp.v1.Server; + +public class SyncListServersString { + + public static void main(String[] args) throws Exception { + syncListServersString(); + } + + public static void syncListServersString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Server element : cloudFtpClient.listServers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListServers_String_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/AsyncListUsers.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/AsyncListUsers.java new file mode 100644 index 000000000000..88dc6b020ea3 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/AsyncListUsers.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListUsers_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ListUsersRequest; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.ftp.v1.UserView; + +public class AsyncListUsers { + + public static void main(String[] args) throws Exception { + asyncListUsers(); + } + + public static void asyncListUsers() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListUsersRequest request = + ListUsersRequest.newBuilder() + .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(UserView.forNumber(0)) + .build(); + ApiFuture future = cloudFtpClient.listUsersPagedCallable().futureCall(request); + // Do something. + for (User element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListUsers_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/AsyncListUsersPaged.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/AsyncListUsersPaged.java new file mode 100644 index 000000000000..118dad878283 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/AsyncListUsersPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListUsers_Paged_async] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ListUsersRequest; +import com.google.cloud.ftp.v1.ListUsersResponse; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.ftp.v1.UserView; +import com.google.common.base.Strings; + +public class AsyncListUsersPaged { + + public static void main(String[] args) throws Exception { + asyncListUsersPaged(); + } + + public static void asyncListUsersPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListUsersRequest request = + ListUsersRequest.newBuilder() + .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(UserView.forNumber(0)) + .build(); + while (true) { + ListUsersResponse response = cloudFtpClient.listUsersCallable().call(request); + for (User element : response.getUsersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListUsers_Paged_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsers.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsers.java new file mode 100644 index 000000000000..54dc2fda0dd1 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsers.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListUsers_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ListUsersRequest; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; +import com.google.cloud.ftp.v1.UserView; + +public class SyncListUsers { + + public static void main(String[] args) throws Exception { + syncListUsers(); + } + + public static void syncListUsers() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ListUsersRequest request = + ListUsersRequest.newBuilder() + .setParent(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(UserView.forNumber(0)) + .build(); + for (User element : cloudFtpClient.listUsers(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListUsers_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsersServername.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsersServername.java new file mode 100644 index 000000000000..ea94272e1607 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsersServername.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListUsers_Servername_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; + +public class SyncListUsersServername { + + public static void main(String[] args) throws Exception { + syncListUsersServername(); + } + + public static void syncListUsersServername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ServerName parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + for (User element : cloudFtpClient.listUsers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListUsers_Servername_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsersString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsersString.java new file mode 100644 index 000000000000..ab1d5b207987 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/listusers/SyncListUsersString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_ListUsers_String_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.User; + +public class SyncListUsersString { + + public static void main(String[] args) throws Exception { + syncListUsersString(); + } + + public static void syncListUsersString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String parent = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString(); + for (User element : cloudFtpClient.listUsers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END ftp_v1_generated_CloudFtp_ListUsers_String_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/AsyncStartServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/AsyncStartServer.java new file mode 100644 index 000000000000..ac7fec1dc56d --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/AsyncStartServer.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StartServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.StartServerRequest; +import com.google.longrunning.Operation; + +public class AsyncStartServer { + + public static void main(String[] args) throws Exception { + asyncStartServer(); + } + + public static void asyncStartServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + StartServerRequest request = + StartServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + ApiFuture future = cloudFtpClient.startServerCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StartServer_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/AsyncStartServerLRO.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/AsyncStartServerLRO.java new file mode 100644 index 000000000000..050afcd3b76e --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/AsyncStartServerLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StartServer_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.StartServerRequest; + +public class AsyncStartServerLRO { + + public static void main(String[] args) throws Exception { + asyncStartServerLRO(); + } + + public static void asyncStartServerLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + StartServerRequest request = + StartServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + OperationFuture future = + cloudFtpClient.startServerOperationCallable().futureCall(request); + // Do something. + Server response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StartServer_LRO_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServer.java new file mode 100644 index 000000000000..b2257c460d34 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServer.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StartServer_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.StartServerRequest; + +public class SyncStartServer { + + public static void main(String[] args) throws Exception { + syncStartServer(); + } + + public static void syncStartServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + StartServerRequest request = + StartServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + Server response = cloudFtpClient.startServerAsync(request).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StartServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServerServername.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServerServername.java new file mode 100644 index 000000000000..896792713413 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServerServername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StartServer_Servername_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; + +public class SyncStartServerServername { + + public static void main(String[] args) throws Exception { + syncStartServerServername(); + } + + public static void syncStartServerServername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + Server response = cloudFtpClient.startServerAsync(name).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StartServer_Servername_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServerString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServerString.java new file mode 100644 index 000000000000..5bde0ca4a417 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/startserver/SyncStartServerString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StartServer_String_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; + +public class SyncStartServerString { + + public static void main(String[] args) throws Exception { + syncStartServerString(); + } + + public static void syncStartServerString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString(); + Server response = cloudFtpClient.startServerAsync(name).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StartServer_String_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/AsyncStopServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/AsyncStopServer.java new file mode 100644 index 000000000000..3a9f61a17b22 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/AsyncStopServer.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StopServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.StopServerRequest; +import com.google.longrunning.Operation; + +public class AsyncStopServer { + + public static void main(String[] args) throws Exception { + asyncStopServer(); + } + + public static void asyncStopServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + StopServerRequest request = + StopServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + ApiFuture future = cloudFtpClient.stopServerCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StopServer_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/AsyncStopServerLRO.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/AsyncStopServerLRO.java new file mode 100644 index 000000000000..42bfb15dfc68 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/AsyncStopServerLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StopServer_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.StopServerRequest; + +public class AsyncStopServerLRO { + + public static void main(String[] args) throws Exception { + asyncStopServerLRO(); + } + + public static void asyncStopServerLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + StopServerRequest request = + StopServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + OperationFuture future = + cloudFtpClient.stopServerOperationCallable().futureCall(request); + // Do something. + Server response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StopServer_LRO_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServer.java new file mode 100644 index 000000000000..3c5d4ed53601 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServer.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StopServer_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; +import com.google.cloud.ftp.v1.StopServerRequest; + +public class SyncStopServer { + + public static void main(String[] args) throws Exception { + syncStopServer(); + } + + public static void syncStopServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + StopServerRequest request = + StopServerRequest.newBuilder() + .setName(ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString()) + .build(); + Server response = cloudFtpClient.stopServerAsync(request).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StopServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServerServername.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServerServername.java new file mode 100644 index 000000000000..c2131f728c3e --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServerServername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StopServer_Servername_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; + +public class SyncStopServerServername { + + public static void main(String[] args) throws Exception { + syncStopServerServername(); + } + + public static void syncStopServerServername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + ServerName name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]"); + Server response = cloudFtpClient.stopServerAsync(name).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StopServer_Servername_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServerString.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServerString.java new file mode 100644 index 000000000000..70df1a823e0e --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/stopserver/SyncStopServerString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_StopServer_String_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.ServerName; + +public class SyncStopServerString { + + public static void main(String[] args) throws Exception { + syncStopServerString(); + } + + public static void syncStopServerString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + String name = ServerName.of("[PROJECT]", "[LOCATION]", "[SERVER]").toString(); + Server response = cloudFtpClient.stopServerAsync(name).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_StopServer_String_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/AsyncUpdateServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/AsyncUpdateServer.java new file mode 100644 index 000000000000..d25aff3cd147 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/AsyncUpdateServer.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_UpdateServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.UpdateServerRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateServer { + + public static void main(String[] args) throws Exception { + asyncUpdateServer(); + } + + public static void asyncUpdateServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + UpdateServerRequest request = + UpdateServerRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setServer(Server.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = cloudFtpClient.updateServerCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_UpdateServer_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/AsyncUpdateServerLRO.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/AsyncUpdateServerLRO.java new file mode 100644 index 000000000000..aadba66db04c --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/AsyncUpdateServerLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_UpdateServer_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.UpdateServerRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateServerLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateServerLRO(); + } + + public static void asyncUpdateServerLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + UpdateServerRequest request = + UpdateServerRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setServer(Server.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudFtpClient.updateServerOperationCallable().futureCall(request); + // Do something. + Server response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_UpdateServer_LRO_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/SyncUpdateServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/SyncUpdateServer.java new file mode 100644 index 000000000000..72a488ce9a71 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/SyncUpdateServer.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_UpdateServer_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.cloud.ftp.v1.UpdateServerRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateServer { + + public static void main(String[] args) throws Exception { + syncUpdateServer(); + } + + public static void syncUpdateServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + UpdateServerRequest request = + UpdateServerRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setServer(Server.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Server response = cloudFtpClient.updateServerAsync(request).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_UpdateServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/SyncUpdateServerServerFieldmask.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/SyncUpdateServerServerFieldmask.java new file mode 100644 index 000000000000..be0443ab653e --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateserver/SyncUpdateServerServerFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_UpdateServer_ServerFieldmask_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.Server; +import com.google.protobuf.FieldMask; + +public class SyncUpdateServerServerFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateServerServerFieldmask(); + } + + public static void syncUpdateServerServerFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + Server server = Server.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Server response = cloudFtpClient.updateServerAsync(server, updateMask).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_UpdateServer_ServerFieldmask_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/AsyncUpdateUser.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/AsyncUpdateUser.java new file mode 100644 index 000000000000..9fcc827cb939 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/AsyncUpdateUser.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_UpdateUser_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.UpdateUserRequest; +import com.google.cloud.ftp.v1.User; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateUser { + + public static void main(String[] args) throws Exception { + asyncUpdateUser(); + } + + public static void asyncUpdateUser() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + UpdateUserRequest request = + UpdateUserRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setUser(User.newBuilder().build()) + .build(); + ApiFuture future = cloudFtpClient.updateUserCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_UpdateUser_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/AsyncUpdateUserLRO.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/AsyncUpdateUserLRO.java new file mode 100644 index 000000000000..90e4d0481d3b --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/AsyncUpdateUserLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_UpdateUser_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.OperationMetadata; +import com.google.cloud.ftp.v1.UpdateUserRequest; +import com.google.cloud.ftp.v1.User; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateUserLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateUserLRO(); + } + + public static void asyncUpdateUserLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + UpdateUserRequest request = + UpdateUserRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setUser(User.newBuilder().build()) + .build(); + OperationFuture future = + cloudFtpClient.updateUserOperationCallable().futureCall(request); + // Do something. + User response = future.get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_UpdateUser_LRO_async] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/SyncUpdateUser.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/SyncUpdateUser.java new file mode 100644 index 000000000000..cb17589fb37c --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/SyncUpdateUser.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_UpdateUser_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.UpdateUserRequest; +import com.google.cloud.ftp.v1.User; +import com.google.protobuf.FieldMask; + +public class SyncUpdateUser { + + public static void main(String[] args) throws Exception { + syncUpdateUser(); + } + + public static void syncUpdateUser() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + UpdateUserRequest request = + UpdateUserRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setUser(User.newBuilder().build()) + .build(); + User response = cloudFtpClient.updateUserAsync(request).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_UpdateUser_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/SyncUpdateUserUserFieldmask.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/SyncUpdateUserUserFieldmask.java new file mode 100644 index 000000000000..976b1469a008 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftp/updateuser/SyncUpdateUserUserFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtp_UpdateUser_UserFieldmask_sync] +import com.google.cloud.ftp.v1.CloudFtpClient; +import com.google.cloud.ftp.v1.User; +import com.google.protobuf.FieldMask; + +public class SyncUpdateUserUserFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateUserUserFieldmask(); + } + + public static void syncUpdateUserUserFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudFtpClient cloudFtpClient = CloudFtpClient.create()) { + User user = User.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + User response = cloudFtpClient.updateUserAsync(user, updateMask).get(); + } + } +} +// [END ftp_v1_generated_CloudFtp_UpdateUser_UserFieldmask_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftpsettings/createserver/SyncCreateServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftpsettings/createserver/SyncCreateServer.java new file mode 100644 index 000000000000..cecce019307d --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftpsettings/createserver/SyncCreateServer.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtpSettings_CreateServer_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.ftp.v1.CloudFtpSettings; +import java.time.Duration; + +public class SyncCreateServer { + + public static void main(String[] args) throws Exception { + syncCreateServer(); + } + + public static void syncCreateServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudFtpSettings.Builder cloudFtpSettingsBuilder = CloudFtpSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + cloudFtpSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END ftp_v1_generated_CloudFtpSettings_CreateServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftpsettings/getserver/SyncGetServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftpsettings/getserver/SyncGetServer.java new file mode 100644 index 000000000000..0cceeacdf89c --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/cloudftpsettings/getserver/SyncGetServer.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.samples; + +// [START ftp_v1_generated_CloudFtpSettings_GetServer_sync] +import com.google.cloud.ftp.v1.CloudFtpSettings; +import java.time.Duration; + +public class SyncGetServer { + + public static void main(String[] args) throws Exception { + syncGetServer(); + } + + public static void syncGetServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudFtpSettings.Builder cloudFtpSettingsBuilder = CloudFtpSettings.newBuilder(); + cloudFtpSettingsBuilder + .getServerSettings() + .setRetrySettings( + cloudFtpSettingsBuilder + .getServerSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + CloudFtpSettings cloudFtpSettings = cloudFtpSettingsBuilder.build(); + } +} +// [END ftp_v1_generated_CloudFtpSettings_GetServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/stub/cloudftpstubsettings/createserver/SyncCreateServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/stub/cloudftpstubsettings/createserver/SyncCreateServer.java new file mode 100644 index 000000000000..c35e612be649 --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/stub/cloudftpstubsettings/createserver/SyncCreateServer.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.stub.samples; + +// [START ftp_v1_generated_CloudFtpStubSettings_CreateServer_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.ftp.v1.stub.CloudFtpStubSettings; +import java.time.Duration; + +public class SyncCreateServer { + + public static void main(String[] args) throws Exception { + syncCreateServer(); + } + + public static void syncCreateServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudFtpStubSettings.Builder cloudFtpSettingsBuilder = CloudFtpStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + cloudFtpSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END ftp_v1_generated_CloudFtpStubSettings_CreateServer_sync] diff --git a/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/stub/cloudftpstubsettings/getserver/SyncGetServer.java b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/stub/cloudftpstubsettings/getserver/SyncGetServer.java new file mode 100644 index 000000000000..8d2206cb8adc --- /dev/null +++ b/java-ftp/samples/snippets/generated/com/google/cloud/ftp/v1/stub/cloudftpstubsettings/getserver/SyncGetServer.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.ftp.v1.stub.samples; + +// [START ftp_v1_generated_CloudFtpStubSettings_GetServer_sync] +import com.google.cloud.ftp.v1.stub.CloudFtpStubSettings; +import java.time.Duration; + +public class SyncGetServer { + + public static void main(String[] args) throws Exception { + syncGetServer(); + } + + public static void syncGetServer() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudFtpStubSettings.Builder cloudFtpSettingsBuilder = CloudFtpStubSettings.newBuilder(); + cloudFtpSettingsBuilder + .getServerSettings() + .setRetrySettings( + cloudFtpSettingsBuilder + .getServerSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + CloudFtpStubSettings cloudFtpSettings = cloudFtpSettingsBuilder.build(); + } +} +// [END ftp_v1_generated_CloudFtpStubSettings_GetServer_sync] diff --git a/librarian.yaml b/librarian.yaml index bf59b1aa43c1..3706fa5b0a52 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -1944,6 +1944,13 @@ libraries: recommended_package: com.google.cloud.firestore transport_override: grpc skip_pom_updates: true + - name: ftp + version: 0.1.0-SNAPSHOT + apis: + - path: google/cloud/ftp/v1 + java: + additional_protos: + - path: google/cloud/location/locations.proto - name: functions version: 2.98.0-SNAPSHOT apis: diff --git a/pom.xml b/pom.xml index c1a286d6d611..eada5a871c96 100644 --- a/pom.xml +++ b/pom.xml @@ -124,6 +124,7 @@ java-filestore java-financialservices java-firestore + java-ftp java-functions java-gdchardwaremanagement java-geminidataanalytics diff --git a/versions.txt b/versions.txt index ec9aab8ba84c..8d6fa965f938 100644 --- a/versions.txt +++ b/versions.txt @@ -1106,3 +1106,7 @@ google-cloud-workloadidentity-bom:0.0.0:0.1.0-SNAPSHOT proto-google-cloud-workloadidentity-v1:0.0.0:0.1.0-SNAPSHOT grpc-google-cloud-workloadidentity-v1:0.0.0:0.1.0-SNAPSHOT google-cloud-workloadidentity:0.0.0:0.1.0-SNAPSHOT +google-cloud-ftp-parent:0.0.0:0.1.0-SNAPSHOT +google-cloud-ftp-bom:0.0.0:0.1.0-SNAPSHOT +proto-google-cloud-ftp-v1:0.0.0:0.1.0-SNAPSHOT +google-cloud-ftp:0.0.0:0.1.0-SNAPSHOT