com.google.cloud.filestore.v1beta1.NfsExportOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-filestore-v1beta1 Show documentation
Show all versions of proto-google-cloud-filestore-v1beta1 Show documentation
Proto library for google-cloud-filestore
/*
* Copyright 2024 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!
// source: google/cloud/filestore/v1beta1/cloud_filestore_service.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.filestore.v1beta1;
/**
*
*
*
* NFS export options specifications.
*
*
* Protobuf type {@code google.cloud.filestore.v1beta1.NfsExportOptions}
*/
public final class NfsExportOptions extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.filestore.v1beta1.NfsExportOptions)
NfsExportOptionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use NfsExportOptions.newBuilder() to construct.
private NfsExportOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NfsExportOptions() {
ipRanges_ = com.google.protobuf.LazyStringArrayList.emptyList();
accessMode_ = 0;
squashMode_ = 0;
securityFlavors_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new NfsExportOptions();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto
.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto
.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.filestore.v1beta1.NfsExportOptions.class,
com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder.class);
}
/**
*
*
*
* The access mode.
*
*
* Protobuf enum {@code google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode}
*/
public enum AccessMode implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* AccessMode not set.
*
*
* ACCESS_MODE_UNSPECIFIED = 0;
*/
ACCESS_MODE_UNSPECIFIED(0),
/**
*
*
*
* The client can only read the file share.
*
*
* READ_ONLY = 1;
*/
READ_ONLY(1),
/**
*
*
*
* The client can read and write the file share (default).
*
*
* READ_WRITE = 2;
*/
READ_WRITE(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* AccessMode not set.
*
*
* ACCESS_MODE_UNSPECIFIED = 0;
*/
public static final int ACCESS_MODE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The client can only read the file share.
*
*
* READ_ONLY = 1;
*/
public static final int READ_ONLY_VALUE = 1;
/**
*
*
*
* The client can read and write the file share (default).
*
*
* 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 AccessMode 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 AccessMode forNumber(int value) {
switch (value) {
case 0:
return ACCESS_MODE_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 AccessMode findValueByNumber(int number) {
return AccessMode.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.filestore.v1beta1.NfsExportOptions.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final AccessMode[] VALUES = values();
public static AccessMode 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 AccessMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode)
}
/**
*
*
*
* The squash mode.
*
*
* Protobuf enum {@code google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode}
*/
public enum SquashMode implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* SquashMode not set.
*
*
* SQUASH_MODE_UNSPECIFIED = 0;
*/
SQUASH_MODE_UNSPECIFIED(0),
/**
*
*
*
* The Root user has root access to the file share (default).
*
*
* NO_ROOT_SQUASH = 1;
*/
NO_ROOT_SQUASH(1),
/**
*
*
*
* The Root user has squashed access to the anonymous uid/gid.
*
*
* ROOT_SQUASH = 2;
*/
ROOT_SQUASH(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* SquashMode not set.
*
*
* SQUASH_MODE_UNSPECIFIED = 0;
*/
public static final int SQUASH_MODE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The Root user has root access to the file share (default).
*
*
* NO_ROOT_SQUASH = 1;
*/
public static final int NO_ROOT_SQUASH_VALUE = 1;
/**
*
*
*
* The Root user has squashed access to the anonymous uid/gid.
*
*
* ROOT_SQUASH = 2;
*/
public static final int ROOT_SQUASH_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 SquashMode 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 SquashMode forNumber(int value) {
switch (value) {
case 0:
return SQUASH_MODE_UNSPECIFIED;
case 1:
return NO_ROOT_SQUASH;
case 2:
return ROOT_SQUASH;
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 SquashMode findValueByNumber(int number) {
return SquashMode.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.filestore.v1beta1.NfsExportOptions.getDescriptor()
.getEnumTypes()
.get(1);
}
private static final SquashMode[] VALUES = values();
public static SquashMode 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 SquashMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode)
}
/**
*
*
*
* The security flavor. In general, a "flavor" represents a designed process
* or system. A "security flavor" is a system designed for the purpose of
* authenticating a data originator (client), recipient (server), and the data
* they transmit between one another.
*
*
* Protobuf enum {@code google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor}
*/
public enum SecurityFlavor implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* SecurityFlavor not set.
*
*
* SECURITY_FLAVOR_UNSPECIFIED = 0;
*/
SECURITY_FLAVOR_UNSPECIFIED(0),
/**
*
*
*
* The user's UNIX user-id and group-ids are transferred "in the clear" (not
* encrypted) on the network, unauthenticated by the NFS server (default).
*
*
* AUTH_SYS = 1;
*/
AUTH_SYS(1),
/**
*
*
*
* End-user authentication through Kerberos V5.
*
*
* KRB5 = 2;
*/
KRB5(2),
/**
*
*
*
* krb5 plus integrity protection (data packets are tamper proof).
*
*
* KRB5I = 3;
*/
KRB5I(3),
/**
*
*
*
* krb5i plus privacy protection (data packets are tamper proof and
* encrypted).
*
*
* KRB5P = 4;
*/
KRB5P(4),
UNRECOGNIZED(-1),
;
/**
*
*
*
* SecurityFlavor not set.
*
*
* SECURITY_FLAVOR_UNSPECIFIED = 0;
*/
public static final int SECURITY_FLAVOR_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The user's UNIX user-id and group-ids are transferred "in the clear" (not
* encrypted) on the network, unauthenticated by the NFS server (default).
*
*
* AUTH_SYS = 1;
*/
public static final int AUTH_SYS_VALUE = 1;
/**
*
*
*
* End-user authentication through Kerberos V5.
*
*
* KRB5 = 2;
*/
public static final int KRB5_VALUE = 2;
/**
*
*
*
* krb5 plus integrity protection (data packets are tamper proof).
*
*
* KRB5I = 3;
*/
public static final int KRB5I_VALUE = 3;
/**
*
*
*
* krb5i plus privacy protection (data packets are tamper proof and
* encrypted).
*
*
* KRB5P = 4;
*/
public static final int KRB5P_VALUE = 4;
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 SecurityFlavor 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 SecurityFlavor forNumber(int value) {
switch (value) {
case 0:
return SECURITY_FLAVOR_UNSPECIFIED;
case 1:
return AUTH_SYS;
case 2:
return KRB5;
case 3:
return KRB5I;
case 4:
return KRB5P;
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 SecurityFlavor findValueByNumber(int number) {
return SecurityFlavor.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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.filestore.v1beta1.NfsExportOptions.getDescriptor()
.getEnumTypes()
.get(2);
}
private static final SecurityFlavor[] VALUES = values();
public static SecurityFlavor 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 SecurityFlavor(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor)
}
public static final int IP_RANGES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList ipRanges_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @return A list containing the ipRanges.
*/
public com.google.protobuf.ProtocolStringList getIpRangesList() {
return ipRanges_;
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @return The count of ipRanges.
*/
public int getIpRangesCount() {
return ipRanges_.size();
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @param index The index of the element to return.
* @return The ipRanges at the given index.
*/
public java.lang.String getIpRanges(int index) {
return ipRanges_.get(index);
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @param index The index of the value to return.
* @return The bytes of the ipRanges at the given index.
*/
public com.google.protobuf.ByteString getIpRangesBytes(int index) {
return ipRanges_.getByteString(index);
}
public static final int ACCESS_MODE_FIELD_NUMBER = 2;
private int accessMode_ = 0;
/**
*
*
*
* Either READ_ONLY, for allowing only read requests on the exported
* directory, or READ_WRITE, for allowing both read and write requests.
* The default is READ_WRITE.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2;
*
* @return The enum numeric value on the wire for accessMode.
*/
@java.lang.Override
public int getAccessModeValue() {
return accessMode_;
}
/**
*
*
*
* Either READ_ONLY, for allowing only read requests on the exported
* directory, or READ_WRITE, for allowing both read and write requests.
* The default is READ_WRITE.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2;
*
* @return The accessMode.
*/
@java.lang.Override
public com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode getAccessMode() {
com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode result =
com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.forNumber(accessMode_);
return result == null
? com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.UNRECOGNIZED
: result;
}
public static final int SQUASH_MODE_FIELD_NUMBER = 3;
private int squashMode_ = 0;
/**
*
*
*
* Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
* or ROOT_SQUASH, for not allowing root access. The default is
* NO_ROOT_SQUASH.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3;
*
* @return The enum numeric value on the wire for squashMode.
*/
@java.lang.Override
public int getSquashModeValue() {
return squashMode_;
}
/**
*
*
*
* Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
* or ROOT_SQUASH, for not allowing root access. The default is
* NO_ROOT_SQUASH.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3;
*
* @return The squashMode.
*/
@java.lang.Override
public com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode getSquashMode() {
com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode result =
com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.forNumber(squashMode_);
return result == null
? com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.UNRECOGNIZED
: result;
}
public static final int ANON_UID_FIELD_NUMBER = 4;
private long anonUid_ = 0L;
/**
*
*
*
* An integer representing the anonymous user id with a default value of
* 65534.
* Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be
* returned if this field is specified for other squash_mode settings.
*
*
* int64 anon_uid = 4;
*
* @return The anonUid.
*/
@java.lang.Override
public long getAnonUid() {
return anonUid_;
}
public static final int ANON_GID_FIELD_NUMBER = 5;
private long anonGid_ = 0L;
/**
*
*
*
* An integer representing the anonymous group id with a default value of
* 65534.
* Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be
* returned if this field is specified for other squash_mode settings.
*
*
* int64 anon_gid = 5;
*
* @return The anonGid.
*/
@java.lang.Override
public long getAnonGid() {
return anonGid_;
}
public static final int SECURITY_FLAVORS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private java.util.List securityFlavors_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor>
securityFlavors_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer,
com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor>() {
public com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor convert(
java.lang.Integer from) {
com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor result =
com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor.forNumber(
from);
return result == null
? com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor.UNRECOGNIZED
: result;
}
};
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @return A list containing the securityFlavors.
*/
@java.lang.Override
public java.util.List
getSecurityFlavorsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor>(
securityFlavors_, securityFlavors_converter_);
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @return The count of securityFlavors.
*/
@java.lang.Override
public int getSecurityFlavorsCount() {
return securityFlavors_.size();
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param index The index of the element to return.
* @return The securityFlavors at the given index.
*/
@java.lang.Override
public com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor getSecurityFlavors(
int index) {
return securityFlavors_converter_.convert(securityFlavors_.get(index));
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @return A list containing the enum numeric values on the wire for securityFlavors.
*/
@java.lang.Override
public java.util.List getSecurityFlavorsValueList() {
return securityFlavors_;
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of securityFlavors at the given index.
*/
@java.lang.Override
public int getSecurityFlavorsValue(int index) {
return securityFlavors_.get(index);
}
private int securityFlavorsMemoizedSerializedSize;
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 {
getSerializedSize();
for (int i = 0; i < ipRanges_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipRanges_.getRaw(i));
}
if (accessMode_
!= com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.ACCESS_MODE_UNSPECIFIED
.getNumber()) {
output.writeEnum(2, accessMode_);
}
if (squashMode_
!= com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.SQUASH_MODE_UNSPECIFIED
.getNumber()) {
output.writeEnum(3, squashMode_);
}
if (anonUid_ != 0L) {
output.writeInt64(4, anonUid_);
}
if (anonGid_ != 0L) {
output.writeInt64(5, anonGid_);
}
if (getSecurityFlavorsList().size() > 0) {
output.writeUInt32NoTag(50);
output.writeUInt32NoTag(securityFlavorsMemoizedSerializedSize);
}
for (int i = 0; i < securityFlavors_.size(); i++) {
output.writeEnumNoTag(securityFlavors_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < ipRanges_.size(); i++) {
dataSize += computeStringSizeNoTag(ipRanges_.getRaw(i));
}
size += dataSize;
size += 1 * getIpRangesList().size();
}
if (accessMode_
!= com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.ACCESS_MODE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, accessMode_);
}
if (squashMode_
!= com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.SQUASH_MODE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, squashMode_);
}
if (anonUid_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, anonUid_);
}
if (anonGid_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, anonGid_);
}
{
int dataSize = 0;
for (int i = 0; i < securityFlavors_.size(); i++) {
dataSize +=
com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(securityFlavors_.get(i));
}
size += dataSize;
if (!getSecurityFlavorsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
}
securityFlavorsMemoizedSerializedSize = dataSize;
}
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.filestore.v1beta1.NfsExportOptions)) {
return super.equals(obj);
}
com.google.cloud.filestore.v1beta1.NfsExportOptions other =
(com.google.cloud.filestore.v1beta1.NfsExportOptions) obj;
if (!getIpRangesList().equals(other.getIpRangesList())) return false;
if (accessMode_ != other.accessMode_) return false;
if (squashMode_ != other.squashMode_) return false;
if (getAnonUid() != other.getAnonUid()) return false;
if (getAnonGid() != other.getAnonGid()) return false;
if (!securityFlavors_.equals(other.securityFlavors_)) 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 (getIpRangesCount() > 0) {
hash = (37 * hash) + IP_RANGES_FIELD_NUMBER;
hash = (53 * hash) + getIpRangesList().hashCode();
}
hash = (37 * hash) + ACCESS_MODE_FIELD_NUMBER;
hash = (53 * hash) + accessMode_;
hash = (37 * hash) + SQUASH_MODE_FIELD_NUMBER;
hash = (53 * hash) + squashMode_;
hash = (37 * hash) + ANON_UID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAnonUid());
hash = (37 * hash) + ANON_GID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAnonGid());
if (getSecurityFlavorsCount() > 0) {
hash = (37 * hash) + SECURITY_FLAVORS_FIELD_NUMBER;
hash = (53 * hash) + securityFlavors_.hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions 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.filestore.v1beta1.NfsExportOptions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions 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.filestore.v1beta1.NfsExportOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.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.filestore.v1beta1.NfsExportOptions 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.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* NFS export options specifications.
*
*
* Protobuf type {@code google.cloud.filestore.v1beta1.NfsExportOptions}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.filestore.v1beta1.NfsExportOptions)
com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto
.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto
.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.filestore.v1beta1.NfsExportOptions.class,
com.google.cloud.filestore.v1beta1.NfsExportOptions.Builder.class);
}
// Construct using com.google.cloud.filestore.v1beta1.NfsExportOptions.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
ipRanges_ = com.google.protobuf.LazyStringArrayList.emptyList();
accessMode_ = 0;
squashMode_ = 0;
anonUid_ = 0L;
anonGid_ = 0L;
securityFlavors_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.filestore.v1beta1.CloudFilestoreServiceProto
.internal_static_google_cloud_filestore_v1beta1_NfsExportOptions_descriptor;
}
@java.lang.Override
public com.google.cloud.filestore.v1beta1.NfsExportOptions getDefaultInstanceForType() {
return com.google.cloud.filestore.v1beta1.NfsExportOptions.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.filestore.v1beta1.NfsExportOptions build() {
com.google.cloud.filestore.v1beta1.NfsExportOptions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.filestore.v1beta1.NfsExportOptions buildPartial() {
com.google.cloud.filestore.v1beta1.NfsExportOptions result =
new com.google.cloud.filestore.v1beta1.NfsExportOptions(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.filestore.v1beta1.NfsExportOptions result) {
if (((bitField0_ & 0x00000020) != 0)) {
securityFlavors_ = java.util.Collections.unmodifiableList(securityFlavors_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.securityFlavors_ = securityFlavors_;
}
private void buildPartial0(com.google.cloud.filestore.v1beta1.NfsExportOptions result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
ipRanges_.makeImmutable();
result.ipRanges_ = ipRanges_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.accessMode_ = accessMode_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.squashMode_ = squashMode_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.anonUid_ = anonUid_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.anonGid_ = anonGid_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.filestore.v1beta1.NfsExportOptions) {
return mergeFrom((com.google.cloud.filestore.v1beta1.NfsExportOptions) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.filestore.v1beta1.NfsExportOptions other) {
if (other == com.google.cloud.filestore.v1beta1.NfsExportOptions.getDefaultInstance())
return this;
if (!other.ipRanges_.isEmpty()) {
if (ipRanges_.isEmpty()) {
ipRanges_ = other.ipRanges_;
bitField0_ |= 0x00000001;
} else {
ensureIpRangesIsMutable();
ipRanges_.addAll(other.ipRanges_);
}
onChanged();
}
if (other.accessMode_ != 0) {
setAccessModeValue(other.getAccessModeValue());
}
if (other.squashMode_ != 0) {
setSquashModeValue(other.getSquashModeValue());
}
if (other.getAnonUid() != 0L) {
setAnonUid(other.getAnonUid());
}
if (other.getAnonGid() != 0L) {
setAnonGid(other.getAnonGid());
}
if (!other.securityFlavors_.isEmpty()) {
if (securityFlavors_.isEmpty()) {
securityFlavors_ = other.securityFlavors_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureSecurityFlavorsIsMutable();
securityFlavors_.addAll(other.securityFlavors_);
}
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:
{
java.lang.String s = input.readStringRequireUtf8();
ensureIpRangesIsMutable();
ipRanges_.add(s);
break;
} // case 10
case 16:
{
accessMode_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24:
{
squashMode_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32:
{
anonUid_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40:
{
anonGid_ = input.readInt64();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48:
{
int tmpRaw = input.readEnum();
ensureSecurityFlavorsIsMutable();
securityFlavors_.add(tmpRaw);
break;
} // case 48
case 50:
{
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureSecurityFlavorsIsMutable();
securityFlavors_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 50
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.LazyStringArrayList ipRanges_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureIpRangesIsMutable() {
if (!ipRanges_.isModifiable()) {
ipRanges_ = new com.google.protobuf.LazyStringArrayList(ipRanges_);
}
bitField0_ |= 0x00000001;
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @return A list containing the ipRanges.
*/
public com.google.protobuf.ProtocolStringList getIpRangesList() {
ipRanges_.makeImmutable();
return ipRanges_;
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @return The count of ipRanges.
*/
public int getIpRangesCount() {
return ipRanges_.size();
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @param index The index of the element to return.
* @return The ipRanges at the given index.
*/
public java.lang.String getIpRanges(int index) {
return ipRanges_.get(index);
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @param index The index of the value to return.
* @return The bytes of the ipRanges at the given index.
*/
public com.google.protobuf.ByteString getIpRangesBytes(int index) {
return ipRanges_.getByteString(index);
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @param index The index to set the value at.
* @param value The ipRanges to set.
* @return This builder for chaining.
*/
public Builder setIpRanges(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureIpRangesIsMutable();
ipRanges_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @param value The ipRanges to add.
* @return This builder for chaining.
*/
public Builder addIpRanges(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureIpRangesIsMutable();
ipRanges_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @param values The ipRanges to add.
* @return This builder for chaining.
*/
public Builder addAllIpRanges(java.lang.Iterable values) {
ensureIpRangesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipRanges_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @return This builder for chaining.
*/
public Builder clearIpRanges() {
ipRanges_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
;
onChanged();
return this;
}
/**
*
*
*
* List of either an IPv4 addresses in the format
* `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
* `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
* file share.
* Overlapping IP ranges are not allowed, both within and across
* NfsExportOptions. An error will be returned.
* The limit is 64 IP ranges/addresses for each FileShareConfig among all
* NfsExportOptions.
*
*
* repeated string ip_ranges = 1;
*
* @param value The bytes of the ipRanges to add.
* @return This builder for chaining.
*/
public Builder addIpRangesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureIpRangesIsMutable();
ipRanges_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int accessMode_ = 0;
/**
*
*
*
* Either READ_ONLY, for allowing only read requests on the exported
* directory, or READ_WRITE, for allowing both read and write requests.
* The default is READ_WRITE.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2;
*
* @return The enum numeric value on the wire for accessMode.
*/
@java.lang.Override
public int getAccessModeValue() {
return accessMode_;
}
/**
*
*
*
* Either READ_ONLY, for allowing only read requests on the exported
* directory, or READ_WRITE, for allowing both read and write requests.
* The default is READ_WRITE.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2;
*
* @param value The enum numeric value on the wire for accessMode to set.
* @return This builder for chaining.
*/
public Builder setAccessModeValue(int value) {
accessMode_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Either READ_ONLY, for allowing only read requests on the exported
* directory, or READ_WRITE, for allowing both read and write requests.
* The default is READ_WRITE.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2;
*
* @return The accessMode.
*/
@java.lang.Override
public com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode getAccessMode() {
com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode result =
com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.forNumber(accessMode_);
return result == null
? com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode.UNRECOGNIZED
: result;
}
/**
*
*
*
* Either READ_ONLY, for allowing only read requests on the exported
* directory, or READ_WRITE, for allowing both read and write requests.
* The default is READ_WRITE.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2;
*
* @param value The accessMode to set.
* @return This builder for chaining.
*/
public Builder setAccessMode(
com.google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
accessMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Either READ_ONLY, for allowing only read requests on the exported
* directory, or READ_WRITE, for allowing both read and write requests.
* The default is READ_WRITE.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.AccessMode access_mode = 2;
*
* @return This builder for chaining.
*/
public Builder clearAccessMode() {
bitField0_ = (bitField0_ & ~0x00000002);
accessMode_ = 0;
onChanged();
return this;
}
private int squashMode_ = 0;
/**
*
*
*
* Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
* or ROOT_SQUASH, for not allowing root access. The default is
* NO_ROOT_SQUASH.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3;
*
* @return The enum numeric value on the wire for squashMode.
*/
@java.lang.Override
public int getSquashModeValue() {
return squashMode_;
}
/**
*
*
*
* Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
* or ROOT_SQUASH, for not allowing root access. The default is
* NO_ROOT_SQUASH.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3;
*
* @param value The enum numeric value on the wire for squashMode to set.
* @return This builder for chaining.
*/
public Builder setSquashModeValue(int value) {
squashMode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
* or ROOT_SQUASH, for not allowing root access. The default is
* NO_ROOT_SQUASH.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3;
*
* @return The squashMode.
*/
@java.lang.Override
public com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode getSquashMode() {
com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode result =
com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.forNumber(squashMode_);
return result == null
? com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode.UNRECOGNIZED
: result;
}
/**
*
*
*
* Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
* or ROOT_SQUASH, for not allowing root access. The default is
* NO_ROOT_SQUASH.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3;
*
* @param value The squashMode to set.
* @return This builder for chaining.
*/
public Builder setSquashMode(
com.google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
squashMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
* or ROOT_SQUASH, for not allowing root access. The default is
* NO_ROOT_SQUASH.
*
*
* .google.cloud.filestore.v1beta1.NfsExportOptions.SquashMode squash_mode = 3;
*
* @return This builder for chaining.
*/
public Builder clearSquashMode() {
bitField0_ = (bitField0_ & ~0x00000004);
squashMode_ = 0;
onChanged();
return this;
}
private long anonUid_;
/**
*
*
*
* An integer representing the anonymous user id with a default value of
* 65534.
* Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be
* returned if this field is specified for other squash_mode settings.
*
*
* int64 anon_uid = 4;
*
* @return The anonUid.
*/
@java.lang.Override
public long getAnonUid() {
return anonUid_;
}
/**
*
*
*
* An integer representing the anonymous user id with a default value of
* 65534.
* Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be
* returned if this field is specified for other squash_mode settings.
*
*
* int64 anon_uid = 4;
*
* @param value The anonUid to set.
* @return This builder for chaining.
*/
public Builder setAnonUid(long value) {
anonUid_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* An integer representing the anonymous user id with a default value of
* 65534.
* Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be
* returned if this field is specified for other squash_mode settings.
*
*
* int64 anon_uid = 4;
*
* @return This builder for chaining.
*/
public Builder clearAnonUid() {
bitField0_ = (bitField0_ & ~0x00000008);
anonUid_ = 0L;
onChanged();
return this;
}
private long anonGid_;
/**
*
*
*
* An integer representing the anonymous group id with a default value of
* 65534.
* Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be
* returned if this field is specified for other squash_mode settings.
*
*
* int64 anon_gid = 5;
*
* @return The anonGid.
*/
@java.lang.Override
public long getAnonGid() {
return anonGid_;
}
/**
*
*
*
* An integer representing the anonymous group id with a default value of
* 65534.
* Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be
* returned if this field is specified for other squash_mode settings.
*
*
* int64 anon_gid = 5;
*
* @param value The anonGid to set.
* @return This builder for chaining.
*/
public Builder setAnonGid(long value) {
anonGid_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* An integer representing the anonymous group id with a default value of
* 65534.
* Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be
* returned if this field is specified for other squash_mode settings.
*
*
* int64 anon_gid = 5;
*
* @return This builder for chaining.
*/
public Builder clearAnonGid() {
bitField0_ = (bitField0_ & ~0x00000010);
anonGid_ = 0L;
onChanged();
return this;
}
private java.util.List securityFlavors_ = java.util.Collections.emptyList();
private void ensureSecurityFlavorsIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
securityFlavors_ = new java.util.ArrayList(securityFlavors_);
bitField0_ |= 0x00000020;
}
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @return A list containing the securityFlavors.
*/
public java.util.List
getSecurityFlavorsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor>(
securityFlavors_, securityFlavors_converter_);
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @return The count of securityFlavors.
*/
public int getSecurityFlavorsCount() {
return securityFlavors_.size();
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param index The index of the element to return.
* @return The securityFlavors at the given index.
*/
public com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor getSecurityFlavors(
int index) {
return securityFlavors_converter_.convert(securityFlavors_.get(index));
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param index The index to set the value at.
* @param value The securityFlavors to set.
* @return This builder for chaining.
*/
public Builder setSecurityFlavors(
int index, com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityFlavorsIsMutable();
securityFlavors_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param value The securityFlavors to add.
* @return This builder for chaining.
*/
public Builder addSecurityFlavors(
com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityFlavorsIsMutable();
securityFlavors_.add(value.getNumber());
onChanged();
return this;
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param values The securityFlavors to add.
* @return This builder for chaining.
*/
public Builder addAllSecurityFlavors(
java.lang.Iterable<
? extends com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor>
values) {
ensureSecurityFlavorsIsMutable();
for (com.google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor value : values) {
securityFlavors_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @return This builder for chaining.
*/
public Builder clearSecurityFlavors() {
securityFlavors_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @return A list containing the enum numeric values on the wire for securityFlavors.
*/
public java.util.List getSecurityFlavorsValueList() {
return java.util.Collections.unmodifiableList(securityFlavors_);
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of securityFlavors at the given index.
*/
public int getSecurityFlavorsValue(int index) {
return securityFlavors_.get(index);
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for securityFlavors to set.
* @return This builder for chaining.
*/
public Builder setSecurityFlavorsValue(int index, int value) {
ensureSecurityFlavorsIsMutable();
securityFlavors_.set(index, value);
onChanged();
return this;
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param value The enum numeric value on the wire for securityFlavors to add.
* @return This builder for chaining.
*/
public Builder addSecurityFlavorsValue(int value) {
ensureSecurityFlavorsIsMutable();
securityFlavors_.add(value);
onChanged();
return this;
}
/**
*
*
*
* The security flavors allowed for mount operations.
* The default is AUTH_SYS.
*
*
*
* repeated .google.cloud.filestore.v1beta1.NfsExportOptions.SecurityFlavor security_flavors = 6;
*
*
* @param values The enum numeric values on the wire for securityFlavors to add.
* @return This builder for chaining.
*/
public Builder addAllSecurityFlavorsValue(java.lang.Iterable values) {
ensureSecurityFlavorsIsMutable();
for (int value : values) {
securityFlavors_.add(value);
}
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.filestore.v1beta1.NfsExportOptions)
}
// @@protoc_insertion_point(class_scope:google.cloud.filestore.v1beta1.NfsExportOptions)
private static final com.google.cloud.filestore.v1beta1.NfsExportOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.filestore.v1beta1.NfsExportOptions();
}
public static com.google.cloud.filestore.v1beta1.NfsExportOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NfsExportOptions 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.filestore.v1beta1.NfsExportOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}