com.google.cloud.baremetalsolution.v2.NfsShare Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-bare-metal-solution-v2 Show documentation
Show all versions of proto-google-cloud-bare-metal-solution-v2 Show documentation
Proto library for google-cloud-bare-metal-solution
/*
* Copyright 2023 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/baremetalsolution/v2/nfs_share.proto
package com.google.cloud.baremetalsolution.v2;
/**
*
*
*
* An NFS share.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.NfsShare}
*/
public final class NfsShare extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.NfsShare)
NfsShareOrBuilder {
private static final long serialVersionUID = 0L;
// Use NfsShare.newBuilder() to construct.
private NfsShare(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NfsShare() {
name_ = "";
nfsShareId_ = "";
state_ = 0;
volume_ = "";
allowedClients_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new NfsShare();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.NfsShare.class,
com.google.cloud.baremetalsolution.v2.NfsShare.Builder.class);
}
/**
*
*
*
* The possible states for this NFS share.
*
*
* Protobuf enum {@code google.cloud.baremetalsolution.v2.NfsShare.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* The share is in an unknown state.
*
*
* STATE_UNSPECIFIED = 0;
*/
STATE_UNSPECIFIED(0),
/**
*
*
*
* The share has been provisioned.
*
*
* PROVISIONED = 1;
*/
PROVISIONED(1),
UNRECOGNIZED(-1),
;
/**
*
*
*
* The share is in an unknown state.
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The share has been provisioned.
*
*
* PROVISIONED = 1;
*/
public static final int PROVISIONED_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 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 PROVISIONED;
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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NfsShare.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.baremetalsolution.v2.NfsShare.State)
}
/**
*
*
*
* The possible mount permissions.
*
*
* Protobuf enum {@code google.cloud.baremetalsolution.v2.NfsShare.MountPermissions}
*/
public enum MountPermissions implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Permissions were not specified.
*
*
* MOUNT_PERMISSIONS_UNSPECIFIED = 0;
*/
MOUNT_PERMISSIONS_UNSPECIFIED(0),
/**
*
*
*
* NFS share can be mount with read-only permissions.
*
*
* READ = 1;
*/
READ(1),
/**
*
*
*
* NFS share can be mount with read-write permissions.
*
*
* READ_WRITE = 2;
*/
READ_WRITE(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Permissions were not specified.
*
*
* MOUNT_PERMISSIONS_UNSPECIFIED = 0;
*/
public static final int MOUNT_PERMISSIONS_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* NFS share can be mount with read-only permissions.
*
*
* READ = 1;
*/
public static final int READ_VALUE = 1;
/**
*
*
*
* NFS share can be mount with read-write permissions.
*
*
* 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 MountPermissions 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 MountPermissions forNumber(int value) {
switch (value) {
case 0:
return MOUNT_PERMISSIONS_UNSPECIFIED;
case 1:
return READ;
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 MountPermissions findValueByNumber(int number) {
return MountPermissions.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.baremetalsolution.v2.NfsShare.getDescriptor().getEnumTypes().get(1);
}
private static final MountPermissions[] VALUES = values();
public static MountPermissions 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 MountPermissions(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.NfsShare.MountPermissions)
}
public interface AllowedClientOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.google.api.resource_reference) = { ... }
*
* @return The network.
*/
java.lang.String getNetwork();
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for network.
*/
com.google.protobuf.ByteString getNetworkBytes();
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @return The shareIp.
*/
java.lang.String getShareIp();
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @return The bytes for shareIp.
*/
com.google.protobuf.ByteString getShareIpBytes();
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @return The allowedClientsCidr.
*/
java.lang.String getAllowedClientsCidr();
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @return The bytes for allowedClientsCidr.
*/
com.google.protobuf.ByteString getAllowedClientsCidrBytes();
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @return The enum numeric value on the wire for mountPermissions.
*/
int getMountPermissionsValue();
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @return The mountPermissions.
*/
com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions getMountPermissions();
/**
*
*
*
* Allow dev flag. Which controls whether to allow creation of devices.
*
*
* bool allow_dev = 5;
*
* @return The allowDev.
*/
boolean getAllowDev();
/**
*
*
*
* Allow the setuid flag.
*
*
* bool allow_suid = 6;
*
* @return The allowSuid.
*/
boolean getAllowSuid();
/**
*
*
*
* Disable root squashing, which is a feature of NFS.
* Root squash is a special mapping of the remote superuser (root) identity
* when using identity authentication.
*
*
* bool no_root_squash = 7;
*
* @return The noRootSquash.
*/
boolean getNoRootSquash();
}
/**
*
*
*
* Represents an 'access point' for the share.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.NfsShare.AllowedClient}
*/
public static final class AllowedClient extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient)
AllowedClientOrBuilder {
private static final long serialVersionUID = 0L;
// Use AllowedClient.newBuilder() to construct.
private AllowedClient(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AllowedClient() {
network_ = "";
shareIp_ = "";
allowedClientsCidr_ = "";
mountPermissions_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AllowedClient();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.class,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder.class);
}
public static final int NETWORK_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object network_ = "";
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.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;
}
}
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.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 SHARE_IP_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object shareIp_ = "";
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @return The shareIp.
*/
@java.lang.Override
public java.lang.String getShareIp() {
java.lang.Object ref = shareIp_;
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();
shareIp_ = s;
return s;
}
}
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @return The bytes for shareIp.
*/
@java.lang.Override
public com.google.protobuf.ByteString getShareIpBytes() {
java.lang.Object ref = shareIp_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
shareIp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALLOWED_CLIENTS_CIDR_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object allowedClientsCidr_ = "";
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @return The allowedClientsCidr.
*/
@java.lang.Override
public java.lang.String getAllowedClientsCidr() {
java.lang.Object ref = allowedClientsCidr_;
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();
allowedClientsCidr_ = s;
return s;
}
}
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @return The bytes for allowedClientsCidr.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAllowedClientsCidrBytes() {
java.lang.Object ref = allowedClientsCidr_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
allowedClientsCidr_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MOUNT_PERMISSIONS_FIELD_NUMBER = 4;
private int mountPermissions_ = 0;
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @return The enum numeric value on the wire for mountPermissions.
*/
@java.lang.Override
public int getMountPermissionsValue() {
return mountPermissions_;
}
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @return The mountPermissions.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions getMountPermissions() {
com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions result =
com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions.forNumber(
mountPermissions_);
return result == null
? com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions.UNRECOGNIZED
: result;
}
public static final int ALLOW_DEV_FIELD_NUMBER = 5;
private boolean allowDev_ = false;
/**
*
*
*
* Allow dev flag. Which controls whether to allow creation of devices.
*
*
* bool allow_dev = 5;
*
* @return The allowDev.
*/
@java.lang.Override
public boolean getAllowDev() {
return allowDev_;
}
public static final int ALLOW_SUID_FIELD_NUMBER = 6;
private boolean allowSuid_ = false;
/**
*
*
*
* Allow the setuid flag.
*
*
* bool allow_suid = 6;
*
* @return The allowSuid.
*/
@java.lang.Override
public boolean getAllowSuid() {
return allowSuid_;
}
public static final int NO_ROOT_SQUASH_FIELD_NUMBER = 7;
private boolean noRootSquash_ = false;
/**
*
*
*
* Disable root squashing, which is a feature of NFS.
* Root squash is a special mapping of the remote superuser (root) identity
* when using identity authentication.
*
*
* bool no_root_squash = 7;
*
* @return The noRootSquash.
*/
@java.lang.Override
public boolean getNoRootSquash() {
return noRootSquash_;
}
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.GeneratedMessageV3.isStringEmpty(network_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareIp_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shareIp_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allowedClientsCidr_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, allowedClientsCidr_);
}
if (mountPermissions_
!= com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions
.MOUNT_PERMISSIONS_UNSPECIFIED
.getNumber()) {
output.writeEnum(4, mountPermissions_);
}
if (allowDev_ != false) {
output.writeBool(5, allowDev_);
}
if (allowSuid_ != false) {
output.writeBool(6, allowSuid_);
}
if (noRootSquash_ != false) {
output.writeBool(7, noRootSquash_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareIp_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shareIp_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allowedClientsCidr_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, allowedClientsCidr_);
}
if (mountPermissions_
!= com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions
.MOUNT_PERMISSIONS_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mountPermissions_);
}
if (allowDev_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowDev_);
}
if (allowSuid_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, allowSuid_);
}
if (noRootSquash_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, noRootSquash_);
}
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.baremetalsolution.v2.NfsShare.AllowedClient)) {
return super.equals(obj);
}
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient other =
(com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) obj;
if (!getNetwork().equals(other.getNetwork())) return false;
if (!getShareIp().equals(other.getShareIp())) return false;
if (!getAllowedClientsCidr().equals(other.getAllowedClientsCidr())) return false;
if (mountPermissions_ != other.mountPermissions_) return false;
if (getAllowDev() != other.getAllowDev()) return false;
if (getAllowSuid() != other.getAllowSuid()) return false;
if (getNoRootSquash() != other.getNoRootSquash()) 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) + NETWORK_FIELD_NUMBER;
hash = (53 * hash) + getNetwork().hashCode();
hash = (37 * hash) + SHARE_IP_FIELD_NUMBER;
hash = (53 * hash) + getShareIp().hashCode();
hash = (37 * hash) + ALLOWED_CLIENTS_CIDR_FIELD_NUMBER;
hash = (53 * hash) + getAllowedClientsCidr().hashCode();
hash = (37 * hash) + MOUNT_PERMISSIONS_FIELD_NUMBER;
hash = (53 * hash) + mountPermissions_;
hash = (37 * hash) + ALLOW_DEV_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowDev());
hash = (37 * hash) + ALLOW_SUID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowSuid());
hash = (37 * hash) + NO_ROOT_SQUASH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoRootSquash());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient 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.baremetalsolution.v2.NfsShare.AllowedClient parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient 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.baremetalsolution.v2.NfsShare.AllowedClient parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient 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.baremetalsolution.v2.NfsShare.AllowedClient parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient 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.baremetalsolution.v2.NfsShare.AllowedClient parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient 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.baremetalsolution.v2.NfsShare.AllowedClient 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;
}
/**
*
*
*
* Represents an 'access point' for the share.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.NfsShare.AllowedClient}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient)
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.class,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder.class);
}
// Construct using com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
network_ = "";
shareIp_ = "";
allowedClientsCidr_ = "";
mountPermissions_ = 0;
allowDev_ = false;
allowSuid_ = false;
noRootSquash_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_AllowedClient_descriptor;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient
getDefaultInstanceForType() {
return com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient build() {
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient buildPartial() {
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient result =
new com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.network_ = network_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.shareIp_ = shareIp_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.allowedClientsCidr_ = allowedClientsCidr_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.mountPermissions_ = mountPermissions_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.allowDev_ = allowDev_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.allowSuid_ = allowSuid_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.noRootSquash_ = noRootSquash_;
}
}
@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.baremetalsolution.v2.NfsShare.AllowedClient) {
return mergeFrom((com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient other) {
if (other
== com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.getDefaultInstance())
return this;
if (!other.getNetwork().isEmpty()) {
network_ = other.network_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getShareIp().isEmpty()) {
shareIp_ = other.shareIp_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getAllowedClientsCidr().isEmpty()) {
allowedClientsCidr_ = other.allowedClientsCidr_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.mountPermissions_ != 0) {
setMountPermissionsValue(other.getMountPermissionsValue());
}
if (other.getAllowDev() != false) {
setAllowDev(other.getAllowDev());
}
if (other.getAllowSuid() != false) {
setAllowSuid(other.getAllowSuid());
}
if (other.getNoRootSquash() != false) {
setNoRootSquash(other.getNoRootSquash());
}
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:
{
network_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
shareIp_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
allowedClientsCidr_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32:
{
mountPermissions_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40:
{
allowDev_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48:
{
allowSuid_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 48
case 56:
{
noRootSquash_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 56
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 network_ = "";
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.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;
}
}
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.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;
}
}
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.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_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.google.api.resource_reference) = { ... }
*
* @return This builder for chaining.
*/
public Builder clearNetwork() {
network_ = getDefaultInstance().getNetwork();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The network the access point sits on.
*
*
* string network = 1 [(.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_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object shareIp_ = "";
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @return The shareIp.
*/
public java.lang.String getShareIp() {
java.lang.Object ref = shareIp_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shareIp_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @return The bytes for shareIp.
*/
public com.google.protobuf.ByteString getShareIpBytes() {
java.lang.Object ref = shareIp_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
shareIp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @param value The shareIp to set.
* @return This builder for chaining.
*/
public Builder setShareIp(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shareIp_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @return This builder for chaining.
*/
public Builder clearShareIp() {
shareIp_ = getDefaultInstance().getShareIp();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The IP address of the share on this network.
*
*
* string share_ip = 2;
*
* @param value The bytes for shareIp to set.
* @return This builder for chaining.
*/
public Builder setShareIpBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shareIp_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object allowedClientsCidr_ = "";
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @return The allowedClientsCidr.
*/
public java.lang.String getAllowedClientsCidr() {
java.lang.Object ref = allowedClientsCidr_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
allowedClientsCidr_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @return The bytes for allowedClientsCidr.
*/
public com.google.protobuf.ByteString getAllowedClientsCidrBytes() {
java.lang.Object ref = allowedClientsCidr_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
allowedClientsCidr_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @param value The allowedClientsCidr to set.
* @return This builder for chaining.
*/
public Builder setAllowedClientsCidr(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
allowedClientsCidr_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @return This builder for chaining.
*/
public Builder clearAllowedClientsCidr() {
allowedClientsCidr_ = getDefaultInstance().getAllowedClientsCidr();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The subnet of IP addresses permitted to access the share.
*
*
* string allowed_clients_cidr = 3;
*
* @param value The bytes for allowedClientsCidr to set.
* @return This builder for chaining.
*/
public Builder setAllowedClientsCidrBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
allowedClientsCidr_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private int mountPermissions_ = 0;
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @return The enum numeric value on the wire for mountPermissions.
*/
@java.lang.Override
public int getMountPermissionsValue() {
return mountPermissions_;
}
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @param value The enum numeric value on the wire for mountPermissions to set.
* @return This builder for chaining.
*/
public Builder setMountPermissionsValue(int value) {
mountPermissions_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @return The mountPermissions.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions getMountPermissions() {
com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions result =
com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions.forNumber(
mountPermissions_);
return result == null
? com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions.UNRECOGNIZED
: result;
}
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @param value The mountPermissions to set.
* @return This builder for chaining.
*/
public Builder setMountPermissions(
com.google.cloud.baremetalsolution.v2.NfsShare.MountPermissions value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
mountPermissions_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Mount permissions.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.MountPermissions mount_permissions = 4;
*
*
* @return This builder for chaining.
*/
public Builder clearMountPermissions() {
bitField0_ = (bitField0_ & ~0x00000008);
mountPermissions_ = 0;
onChanged();
return this;
}
private boolean allowDev_;
/**
*
*
*
* Allow dev flag. Which controls whether to allow creation of devices.
*
*
* bool allow_dev = 5;
*
* @return The allowDev.
*/
@java.lang.Override
public boolean getAllowDev() {
return allowDev_;
}
/**
*
*
*
* Allow dev flag. Which controls whether to allow creation of devices.
*
*
* bool allow_dev = 5;
*
* @param value The allowDev to set.
* @return This builder for chaining.
*/
public Builder setAllowDev(boolean value) {
allowDev_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Allow dev flag. Which controls whether to allow creation of devices.
*
*
* bool allow_dev = 5;
*
* @return This builder for chaining.
*/
public Builder clearAllowDev() {
bitField0_ = (bitField0_ & ~0x00000010);
allowDev_ = false;
onChanged();
return this;
}
private boolean allowSuid_;
/**
*
*
*
* Allow the setuid flag.
*
*
* bool allow_suid = 6;
*
* @return The allowSuid.
*/
@java.lang.Override
public boolean getAllowSuid() {
return allowSuid_;
}
/**
*
*
*
* Allow the setuid flag.
*
*
* bool allow_suid = 6;
*
* @param value The allowSuid to set.
* @return This builder for chaining.
*/
public Builder setAllowSuid(boolean value) {
allowSuid_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Allow the setuid flag.
*
*
* bool allow_suid = 6;
*
* @return This builder for chaining.
*/
public Builder clearAllowSuid() {
bitField0_ = (bitField0_ & ~0x00000020);
allowSuid_ = false;
onChanged();
return this;
}
private boolean noRootSquash_;
/**
*
*
*
* Disable root squashing, which is a feature of NFS.
* Root squash is a special mapping of the remote superuser (root) identity
* when using identity authentication.
*
*
* bool no_root_squash = 7;
*
* @return The noRootSquash.
*/
@java.lang.Override
public boolean getNoRootSquash() {
return noRootSquash_;
}
/**
*
*
*
* Disable root squashing, which is a feature of NFS.
* Root squash is a special mapping of the remote superuser (root) identity
* when using identity authentication.
*
*
* bool no_root_squash = 7;
*
* @param value The noRootSquash to set.
* @return This builder for chaining.
*/
public Builder setNoRootSquash(boolean value) {
noRootSquash_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Disable root squashing, which is a feature of NFS.
* Root squash is a special mapping of the remote superuser (root) identity
* when using identity authentication.
*
*
* bool no_root_squash = 7;
*
* @return This builder for chaining.
*/
public Builder clearNoRootSquash() {
bitField0_ = (bitField0_ & ~0x00000040);
noRootSquash_ = false;
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.baremetalsolution.v2.NfsShare.AllowedClient)
}
// @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.NfsShare.AllowedClient)
private static final com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient();
}
public static com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AllowedClient 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.baremetalsolution.v2.NfsShare.AllowedClient
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. The name of the NFS share.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. The name of the NFS share.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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 NFS_SHARE_ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object nfsShareId_ = "";
/**
*
*
*
* Output only. An identifier for the NFS share, generated by the backend.
*
*
* string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The nfsShareId.
*/
@java.lang.Override
public java.lang.String getNfsShareId() {
java.lang.Object ref = nfsShareId_;
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();
nfsShareId_ = s;
return s;
}
}
/**
*
*
*
* Output only. An identifier for the NFS share, generated by the backend.
*
*
* string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for nfsShareId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNfsShareIdBytes() {
java.lang.Object ref = nfsShareId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
nfsShareId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATE_FIELD_NUMBER = 3;
private int state_ = 0;
/**
*
*
*
* The state of the NFS share.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.State state = 3;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The state of the NFS share.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.State state = 3;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.State getState() {
com.google.cloud.baremetalsolution.v2.NfsShare.State result =
com.google.cloud.baremetalsolution.v2.NfsShare.State.forNumber(state_);
return result == null
? com.google.cloud.baremetalsolution.v2.NfsShare.State.UNRECOGNIZED
: result;
}
public static final int VOLUME_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object volume_ = "";
/**
*
*
*
* The volume containing the share.
*
*
* string volume = 4 [(.google.api.resource_reference) = { ... }
*
* @return The volume.
*/
@java.lang.Override
public java.lang.String getVolume() {
java.lang.Object ref = volume_;
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();
volume_ = s;
return s;
}
}
/**
*
*
*
* The volume containing the share.
*
*
* string volume = 4 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for volume.
*/
@java.lang.Override
public com.google.protobuf.ByteString getVolumeBytes() {
java.lang.Object ref = volume_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
volume_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALLOWED_CLIENTS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private java.util.List
allowedClients_;
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
@java.lang.Override
public java.util.List
getAllowedClientsList() {
return allowedClients_;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder>
getAllowedClientsOrBuilderList() {
return allowedClients_;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
@java.lang.Override
public int getAllowedClientsCount() {
return allowedClients_.size();
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient getAllowedClients(int index) {
return allowedClients_.get(index);
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder
getAllowedClientsOrBuilder(int index) {
return allowedClients_.get(index);
}
public static final int LABELS_FIELD_NUMBER = 6;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_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();
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
@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();
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
@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;
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
@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);
}
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.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nfsShareId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nfsShareId_);
}
if (state_
!= com.google.cloud.baremetalsolution.v2.NfsShare.State.STATE_UNSPECIFIED.getNumber()) {
output.writeEnum(3, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volume_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, volume_);
}
for (int i = 0; i < allowedClients_.size(); i++) {
output.writeMessage(5, allowedClients_.get(i));
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nfsShareId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nfsShareId_);
}
if (state_
!= com.google.cloud.baremetalsolution.v2.NfsShare.State.STATE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volume_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, volume_);
}
for (int i = 0; i < allowedClients_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, allowedClients_.get(i));
}
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(6, labels__);
}
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.baremetalsolution.v2.NfsShare)) {
return super.equals(obj);
}
com.google.cloud.baremetalsolution.v2.NfsShare other =
(com.google.cloud.baremetalsolution.v2.NfsShare) obj;
if (!getName().equals(other.getName())) return false;
if (!getNfsShareId().equals(other.getNfsShareId())) return false;
if (state_ != other.state_) return false;
if (!getVolume().equals(other.getVolume())) return false;
if (!getAllowedClientsList().equals(other.getAllowedClientsList())) return false;
if (!internalGetLabels().equals(other.internalGetLabels())) 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) + NFS_SHARE_ID_FIELD_NUMBER;
hash = (53 * hash) + getNfsShareId().hashCode();
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (37 * hash) + VOLUME_FIELD_NUMBER;
hash = (53 * hash) + getVolume().hashCode();
if (getAllowedClientsCount() > 0) {
hash = (37 * hash) + ALLOWED_CLIENTS_FIELD_NUMBER;
hash = (53 * hash) + getAllowedClientsList().hashCode();
}
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare 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.baremetalsolution.v2.NfsShare parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare 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.baremetalsolution.v2.NfsShare parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare 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.baremetalsolution.v2.NfsShare parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare 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.baremetalsolution.v2.NfsShare parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.NfsShare 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.baremetalsolution.v2.NfsShare 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;
}
/**
*
*
*
* An NFS share.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.NfsShare}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.NfsShare)
com.google.cloud.baremetalsolution.v2.NfsShareOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
switch (number) {
case 6:
return internalGetMutableLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.NfsShare.class,
com.google.cloud.baremetalsolution.v2.NfsShare.Builder.class);
}
// Construct using com.google.cloud.baremetalsolution.v2.NfsShare.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
nfsShareId_ = "";
state_ = 0;
volume_ = "";
if (allowedClientsBuilder_ == null) {
allowedClients_ = java.util.Collections.emptyList();
} else {
allowedClients_ = null;
allowedClientsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
internalGetMutableLabels().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.baremetalsolution.v2.NfsShareProto
.internal_static_google_cloud_baremetalsolution_v2_NfsShare_descriptor;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare getDefaultInstanceForType() {
return com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare build() {
com.google.cloud.baremetalsolution.v2.NfsShare result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare buildPartial() {
com.google.cloud.baremetalsolution.v2.NfsShare result =
new com.google.cloud.baremetalsolution.v2.NfsShare(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.baremetalsolution.v2.NfsShare result) {
if (allowedClientsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
allowedClients_ = java.util.Collections.unmodifiableList(allowedClients_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.allowedClients_ = allowedClients_;
} else {
result.allowedClients_ = allowedClientsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.baremetalsolution.v2.NfsShare result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.nfsShareId_ = nfsShareId_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.volume_ = volume_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
}
@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.baremetalsolution.v2.NfsShare) {
return mergeFrom((com.google.cloud.baremetalsolution.v2.NfsShare) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.NfsShare other) {
if (other == com.google.cloud.baremetalsolution.v2.NfsShare.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getNfsShareId().isEmpty()) {
nfsShareId_ = other.nfsShareId_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getVolume().isEmpty()) {
volume_ = other.volume_;
bitField0_ |= 0x00000008;
onChanged();
}
if (allowedClientsBuilder_ == null) {
if (!other.allowedClients_.isEmpty()) {
if (allowedClients_.isEmpty()) {
allowedClients_ = other.allowedClients_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureAllowedClientsIsMutable();
allowedClients_.addAll(other.allowedClients_);
}
onChanged();
}
} else {
if (!other.allowedClients_.isEmpty()) {
if (allowedClientsBuilder_.isEmpty()) {
allowedClientsBuilder_.dispose();
allowedClientsBuilder_ = null;
allowedClients_ = other.allowedClients_;
bitField0_ = (bitField0_ & ~0x00000010);
allowedClientsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getAllowedClientsFieldBuilder()
: null;
} else {
allowedClientsBuilder_.addAllMessages(other.allowedClients_);
}
}
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
bitField0_ |= 0x00000020;
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:
{
nfsShareId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24:
{
state_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34:
{
volume_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient m =
input.readMessage(
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.parser(),
extensionRegistry);
if (allowedClientsBuilder_ == null) {
ensureAllowedClientsIsMutable();
allowedClients_.add(m);
} else {
allowedClientsBuilder_.addMessage(m);
}
break;
} // case 42
case 50:
{
com.google.protobuf.MapEntry labels__ =
input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableLabels()
.getMutableMap()
.put(labels__.getKey(), labels__.getValue());
bitField0_ |= 0x00000020;
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 java.lang.Object name_ = "";
/**
*
*
*
* Output only. The name of the NFS share.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. The name of the NFS share.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. The name of the NFS share.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
/**
*
*
*
* Output only. The name of the NFS share.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. The name of the NFS share.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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 java.lang.Object nfsShareId_ = "";
/**
*
*
*
* Output only. An identifier for the NFS share, generated by the backend.
*
*
* string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The nfsShareId.
*/
public java.lang.String getNfsShareId() {
java.lang.Object ref = nfsShareId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
nfsShareId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. An identifier for the NFS share, generated by the backend.
*
*
* string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for nfsShareId.
*/
public com.google.protobuf.ByteString getNfsShareIdBytes() {
java.lang.Object ref = nfsShareId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
nfsShareId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. An identifier for the NFS share, generated by the backend.
*
*
* string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The nfsShareId to set.
* @return This builder for chaining.
*/
public Builder setNfsShareId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
nfsShareId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. An identifier for the NFS share, generated by the backend.
*
*
* string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearNfsShareId() {
nfsShareId_ = getDefaultInstance().getNfsShareId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Output only. An identifier for the NFS share, generated by the backend.
*
*
* string nfs_share_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for nfsShareId to set.
* @return This builder for chaining.
*/
public Builder setNfsShareIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
nfsShareId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int state_ = 0;
/**
*
*
*
* The state of the NFS share.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.State state = 3;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* The state of the NFS share.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.State state = 3;
*
* @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_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The state of the NFS share.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.State state = 3;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.NfsShare.State getState() {
com.google.cloud.baremetalsolution.v2.NfsShare.State result =
com.google.cloud.baremetalsolution.v2.NfsShare.State.forNumber(state_);
return result == null
? com.google.cloud.baremetalsolution.v2.NfsShare.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* The state of the NFS share.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.State state = 3;
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.baremetalsolution.v2.NfsShare.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The state of the NFS share.
*
*
* .google.cloud.baremetalsolution.v2.NfsShare.State state = 3;
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000004);
state_ = 0;
onChanged();
return this;
}
private java.lang.Object volume_ = "";
/**
*
*
*
* The volume containing the share.
*
*
* string volume = 4 [(.google.api.resource_reference) = { ... }
*
* @return The volume.
*/
public java.lang.String getVolume() {
java.lang.Object ref = volume_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
volume_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The volume containing the share.
*
*
* string volume = 4 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for volume.
*/
public com.google.protobuf.ByteString getVolumeBytes() {
java.lang.Object ref = volume_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
volume_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The volume containing the share.
*
*
* string volume = 4 [(.google.api.resource_reference) = { ... }
*
* @param value The volume to set.
* @return This builder for chaining.
*/
public Builder setVolume(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
volume_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The volume containing the share.
*
*
* string volume = 4 [(.google.api.resource_reference) = { ... }
*
* @return This builder for chaining.
*/
public Builder clearVolume() {
volume_ = getDefaultInstance().getVolume();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* The volume containing the share.
*
*
* string volume = 4 [(.google.api.resource_reference) = { ... }
*
* @param value The bytes for volume to set.
* @return This builder for chaining.
*/
public Builder setVolumeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
volume_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.util.List
allowedClients_ = java.util.Collections.emptyList();
private void ensureAllowedClientsIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
allowedClients_ =
new java.util.ArrayList(
allowedClients_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder>
allowedClientsBuilder_;
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public java.util.List
getAllowedClientsList() {
if (allowedClientsBuilder_ == null) {
return java.util.Collections.unmodifiableList(allowedClients_);
} else {
return allowedClientsBuilder_.getMessageList();
}
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public int getAllowedClientsCount() {
if (allowedClientsBuilder_ == null) {
return allowedClients_.size();
} else {
return allowedClientsBuilder_.getCount();
}
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient getAllowedClients(
int index) {
if (allowedClientsBuilder_ == null) {
return allowedClients_.get(index);
} else {
return allowedClientsBuilder_.getMessage(index);
}
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder setAllowedClients(
int index, com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient value) {
if (allowedClientsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedClientsIsMutable();
allowedClients_.set(index, value);
onChanged();
} else {
allowedClientsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder setAllowedClients(
int index,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder builderForValue) {
if (allowedClientsBuilder_ == null) {
ensureAllowedClientsIsMutable();
allowedClients_.set(index, builderForValue.build());
onChanged();
} else {
allowedClientsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder addAllowedClients(
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient value) {
if (allowedClientsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedClientsIsMutable();
allowedClients_.add(value);
onChanged();
} else {
allowedClientsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder addAllowedClients(
int index, com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient value) {
if (allowedClientsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedClientsIsMutable();
allowedClients_.add(index, value);
onChanged();
} else {
allowedClientsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder addAllowedClients(
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder builderForValue) {
if (allowedClientsBuilder_ == null) {
ensureAllowedClientsIsMutable();
allowedClients_.add(builderForValue.build());
onChanged();
} else {
allowedClientsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder addAllowedClients(
int index,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder builderForValue) {
if (allowedClientsBuilder_ == null) {
ensureAllowedClientsIsMutable();
allowedClients_.add(index, builderForValue.build());
onChanged();
} else {
allowedClientsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder addAllAllowedClients(
java.lang.Iterable extends com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient>
values) {
if (allowedClientsBuilder_ == null) {
ensureAllowedClientsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedClients_);
onChanged();
} else {
allowedClientsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder clearAllowedClients() {
if (allowedClientsBuilder_ == null) {
allowedClients_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
allowedClientsBuilder_.clear();
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public Builder removeAllowedClients(int index) {
if (allowedClientsBuilder_ == null) {
ensureAllowedClientsIsMutable();
allowedClients_.remove(index);
onChanged();
} else {
allowedClientsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder
getAllowedClientsBuilder(int index) {
return getAllowedClientsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder
getAllowedClientsOrBuilder(int index) {
if (allowedClientsBuilder_ == null) {
return allowedClients_.get(index);
} else {
return allowedClientsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public java.util.List<
? extends com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder>
getAllowedClientsOrBuilderList() {
if (allowedClientsBuilder_ != null) {
return allowedClientsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(allowedClients_);
}
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder
addAllowedClientsBuilder() {
return getAllowedClientsFieldBuilder()
.addBuilder(
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.getDefaultInstance());
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder
addAllowedClientsBuilder(int index) {
return getAllowedClientsFieldBuilder()
.addBuilder(
index,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.getDefaultInstance());
}
/**
*
*
*
* List of allowed access points.
*
*
* repeated .google.cloud.baremetalsolution.v2.NfsShare.AllowedClient allowed_clients = 5;
*
*/
public java.util.List
getAllowedClientsBuilderList() {
return getAllowedClientsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder>
getAllowedClientsFieldBuilder() {
if (allowedClientsBuilder_ == null) {
allowedClientsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClient.Builder,
com.google.cloud.baremetalsolution.v2.NfsShare.AllowedClientOrBuilder>(
allowedClients_,
((bitField0_ & 0x00000010) != 0),
getParentForChildren(),
isClean());
allowedClients_ = null;
}
return allowedClientsBuilder_;
}
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();
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
@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();
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
@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;
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
@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;
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
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();
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
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;
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 6;
*/
public Builder putAllLabels(java.util.Map values) {
internalGetMutableLabels().getMutableMap().putAll(values);
bitField0_ |= 0x00000020;
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.baremetalsolution.v2.NfsShare)
}
// @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.NfsShare)
private static final com.google.cloud.baremetalsolution.v2.NfsShare DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.NfsShare();
}
public static com.google.cloud.baremetalsolution.v2.NfsShare getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NfsShare 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.baremetalsolution.v2.NfsShare getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}