Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/storage/v1/bucket.proto
package yandex.cloud.api.storage.v1;
public final class BucketOuterClass {
private BucketOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code yandex.cloud.storage.v1.Versioning}
*/
public enum Versioning
implements com.google.protobuf.ProtocolMessageEnum {
/**
* VERSIONING_UNSPECIFIED = 0;
*/
VERSIONING_UNSPECIFIED(0),
/**
*
* The bucket is unversioned, i.e. versioning has never been enabled for the bucket, including at its creation.
* Objects that are stored in the bucket have a version ID of `null`.
* To enable versioning, change status to `VERSIONING_ENABLED` via a [BucketService.Update] request. Note that this
* action is irreversible, and a bucket with versioning enabled can never return to `VERSIONING_DISABLED` state.
*
* Bucket versioning is enabled, i.e. all new objects are versioned and given a unique version ID, and objects that
* already existed at the time versioning was enabled will be versioned and given a unique version ID when modified
* by future requests.
* To suspend versioning, change status to `VERSIONING_SUSPENDED` via a [BucketService.Update] request. You cannot
* disable versioning altogether for a bucket that already had it enabled; objects that had version IDs will keep
* them.
*
* Bucket versioning is suspended, i.e. new objects are not versioned, but objects that already existed at the time
* versioning was suspended are still versioned and keep their version IDs.
* To resume versioning, change status to `VERSIONING_ENABLED` via a [BucketService.Update] request.
*
*
* VERSIONING_SUSPENDED = 3;
*/
VERSIONING_SUSPENDED(3),
UNRECOGNIZED(-1),
;
/**
* VERSIONING_UNSPECIFIED = 0;
*/
public static final int VERSIONING_UNSPECIFIED_VALUE = 0;
/**
*
* The bucket is unversioned, i.e. versioning has never been enabled for the bucket, including at its creation.
* Objects that are stored in the bucket have a version ID of `null`.
* To enable versioning, change status to `VERSIONING_ENABLED` via a [BucketService.Update] request. Note that this
* action is irreversible, and a bucket with versioning enabled can never return to `VERSIONING_DISABLED` state.
*
*
* VERSIONING_DISABLED = 1;
*/
public static final int VERSIONING_DISABLED_VALUE = 1;
/**
*
* Bucket versioning is enabled, i.e. all new objects are versioned and given a unique version ID, and objects that
* already existed at the time versioning was enabled will be versioned and given a unique version ID when modified
* by future requests.
* To suspend versioning, change status to `VERSIONING_SUSPENDED` via a [BucketService.Update] request. You cannot
* disable versioning altogether for a bucket that already had it enabled; objects that had version IDs will keep
* them.
*
*
* VERSIONING_ENABLED = 2;
*/
public static final int VERSIONING_ENABLED_VALUE = 2;
/**
*
* Bucket versioning is suspended, i.e. new objects are not versioned, but objects that already existed at the time
* versioning was suspended are still versioned and keep their version IDs.
* To resume versioning, change status to `VERSIONING_ENABLED` via a [BucketService.Update] request.
*
*
* VERSIONING_SUSPENDED = 3;
*/
public static final int VERSIONING_SUSPENDED_VALUE = 3;
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 Versioning 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 Versioning forNumber(int value) {
switch (value) {
case 0: return VERSIONING_UNSPECIFIED;
case 1: return VERSIONING_DISABLED;
case 2: return VERSIONING_ENABLED;
case 3: return VERSIONING_SUSPENDED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Versioning> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Versioning findValueByNumber(int number) {
return Versioning.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 yandex.cloud.api.storage.v1.BucketOuterClass.getDescriptor().getEnumTypes().get(0);
}
private static final Versioning[] VALUES = values();
public static Versioning 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 Versioning(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.storage.v1.Versioning)
}
public interface BucketOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.Bucket)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
*
* string folder_id = 3;
* @return The bytes for folderId.
*/
com.google.protobuf.ByteString
getFolderIdBytes();
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 4;
* @return Whether the anonymousAccessFlags field is set.
*/
boolean hasAnonymousAccessFlags();
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string default_storage_class = 5;
* @return The bytes for defaultStorageClass.
*/
com.google.protobuf.ByteString
getDefaultStorageClassBytes();
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
*
* .yandex.cloud.storage.v1.Versioning versioning = 6;
* @return The enum numeric value on the wire for versioning.
*/
int getVersioningValue();
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
* Maximum size of the bucket, in bytes.
* For details, see [documentation](/docs/storage/operations/buckets/limit-max-volume).
*
*
* int64 max_size = 7;
* @return The maxSize.
*/
long getMaxSize();
/**
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
*
* .google.protobuf.Struct policy = 8;
* @return Whether the policy field is set.
*/
boolean hasPolicy();
/**
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
int getCorsCount();
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
yandex.cloud.api.storage.v1.BucketOuterClass.CorsRuleOrBuilder getCorsOrBuilder(
int index);
/**
*
* Configuration for hosting a static website in the bucket.
* For details, see [documentation](/docs/storage/concepts/hosting).
*
*
* .yandex.cloud.storage.v1.WebsiteSettings website_settings = 12;
* @return Whether the websiteSettings field is set.
*/
boolean hasWebsiteSettings();
/**
*
* Configuration for hosting a static website in the bucket.
* For details, see [documentation](/docs/storage/concepts/hosting).
*
* A bucket resource.
* For details about the concept, see [documentation](/docs/storage/concepts/bucket).
*
*
* Protobuf type {@code yandex.cloud.storage.v1.Bucket}
*/
public static final class Bucket extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.Bucket)
BucketOrBuilder {
private static final long serialVersionUID = 0L;
// Use Bucket.newBuilder() to construct.
private Bucket(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Bucket() {
id_ = "";
name_ = "";
folderId_ = "";
defaultStorageClass_ = "";
versioning_ = 0;
cors_ = java.util.Collections.emptyList();
lifecycleRules_ = java.util.Collections.emptyList();
tags_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Bucket();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Bucket(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
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();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
folderId_ = s;
break;
}
case 34: {
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.Builder subBuilder = null;
if (anonymousAccessFlags_ != null) {
subBuilder = anonymousAccessFlags_.toBuilder();
}
anonymousAccessFlags_ = input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(anonymousAccessFlags_);
anonymousAccessFlags_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
defaultStorageClass_ = s;
break;
}
case 48: {
int rawValue = input.readEnum();
versioning_ = rawValue;
break;
}
case 56: {
maxSize_ = input.readInt64();
break;
}
case 66: {
com.google.protobuf.Struct.Builder subBuilder = null;
if (policy_ != null) {
subBuilder = policy_.toBuilder();
}
policy_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(policy_);
policy_ = subBuilder.buildPartial();
}
break;
}
case 74: {
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Builder subBuilder = null;
if (acl_ != null) {
subBuilder = acl_.toBuilder();
}
acl_ = input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.ACL.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(acl_);
acl_ = subBuilder.buildPartial();
}
break;
}
case 82: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 90: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
cors_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
cors_.add(
input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.parser(), extensionRegistry));
break;
}
case 98: {
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Builder subBuilder = null;
if (websiteSettings_ != null) {
subBuilder = websiteSettings_.toBuilder();
}
websiteSettings_ = input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(websiteSettings_);
websiteSettings_ = subBuilder.buildPartial();
}
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
lifecycleRules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
lifecycleRules_.add(
input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.parser(), extensionRegistry));
break;
}
case 114: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
tags_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
tags_.add(
input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.Tag.parser(), extensionRegistry));
break;
}
case 122: {
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.Builder subBuilder = null;
if (objectLock_ != null) {
subBuilder = objectLock_.toBuilder();
}
objectLock_ = input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(objectLock_);
objectLock_ = subBuilder.buildPartial();
}
break;
}
case 130: {
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.Builder subBuilder = null;
if (encryption_ != null) {
subBuilder = encryption_.toBuilder();
}
encryption_ = input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(encryption_);
encryption_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
cors_ = java.util.Collections.unmodifiableList(cors_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
lifecycleRules_ = java.util.Collections.unmodifiableList(lifecycleRules_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
tags_ = java.util.Collections.unmodifiableList(tags_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Bucket_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Bucket_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.Bucket.class, yandex.cloud.api.storage.v1.BucketOuterClass.Bucket.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @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;
}
}
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @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 FOLDER_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object folderId_;
/**
*
*
* string folder_id = 3;
* @return The bytes for folderId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ANONYMOUS_ACCESS_FLAGS_FIELD_NUMBER = 4;
private yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags anonymousAccessFlags_;
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 4;
* @return Whether the anonymousAccessFlags field is set.
*/
@java.lang.Override
public boolean hasAnonymousAccessFlags() {
return anonymousAccessFlags_ != null;
}
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 4;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlagsOrBuilder getAnonymousAccessFlagsOrBuilder() {
return getAnonymousAccessFlags();
}
public static final int DEFAULT_STORAGE_CLASS_FIELD_NUMBER = 5;
private volatile java.lang.Object defaultStorageClass_;
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string default_storage_class = 5;
* @return The bytes for defaultStorageClass.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDefaultStorageClassBytes() {
java.lang.Object ref = defaultStorageClass_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
defaultStorageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERSIONING_FIELD_NUMBER = 6;
private int versioning_;
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
*
* .yandex.cloud.storage.v1.Versioning versioning = 6;
* @return The enum numeric value on the wire for versioning.
*/
@java.lang.Override public int getVersioningValue() {
return versioning_;
}
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
*
* .yandex.cloud.storage.v1.Versioning versioning = 6;
* @return The versioning.
*/
@java.lang.Override public yandex.cloud.api.storage.v1.BucketOuterClass.Versioning getVersioning() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.Versioning result = yandex.cloud.api.storage.v1.BucketOuterClass.Versioning.valueOf(versioning_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.Versioning.UNRECOGNIZED : result;
}
public static final int MAX_SIZE_FIELD_NUMBER = 7;
private long maxSize_;
/**
*
* Maximum size of the bucket, in bytes.
* For details, see [documentation](/docs/storage/operations/buckets/limit-max-volume).
*
*
* int64 max_size = 7;
* @return The maxSize.
*/
@java.lang.Override
public long getMaxSize() {
return maxSize_;
}
public static final int POLICY_FIELD_NUMBER = 8;
private com.google.protobuf.Struct policy_;
/**
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
*
* .google.protobuf.Struct policy = 8;
* @return Whether the policy field is set.
*/
@java.lang.Override
public boolean hasPolicy() {
return policy_ != null;
}
/**
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
*
* .google.protobuf.Struct policy = 8;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getPolicyOrBuilder() {
return getPolicy();
}
public static final int ACL_FIELD_NUMBER = 9;
private yandex.cloud.api.storage.v1.BucketOuterClass.ACL acl_;
/**
*
* Access control list (ACL) of the bucket.
* For details, see [documentation](/docs/storage/concepts/acl).
*
*
* .yandex.cloud.storage.v1.ACL acl = 9;
* @return Whether the acl field is set.
*/
@java.lang.Override
public boolean hasAcl() {
return acl_ != null;
}
/**
*
* Access control list (ACL) of the bucket.
* For details, see [documentation](/docs/storage/concepts/acl).
*
*
* .google.protobuf.Timestamp created_at = 10;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int CORS_FIELD_NUMBER = 11;
private java.util.List cors_;
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
@java.lang.Override
public java.util.List getCorsList() {
return cors_;
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.storage.v1.BucketOuterClass.CorsRuleOrBuilder>
getCorsOrBuilderList() {
return cors_;
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
@java.lang.Override
public int getCorsCount() {
return cors_.size();
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule getCors(int index) {
return cors_.get(index);
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRuleOrBuilder getCorsOrBuilder(
int index) {
return cors_.get(index);
}
public static final int WEBSITE_SETTINGS_FIELD_NUMBER = 12;
private yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings websiteSettings_;
/**
*
* Configuration for hosting a static website in the bucket.
* For details, see [documentation](/docs/storage/concepts/hosting).
*
*
* .yandex.cloud.storage.v1.WebsiteSettings website_settings = 12;
* @return Whether the websiteSettings field is set.
*/
@java.lang.Override
public boolean hasWebsiteSettings() {
return websiteSettings_ != null;
}
/**
*
* Configuration for hosting a static website in the bucket.
* For details, see [documentation](/docs/storage/concepts/hosting).
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* ID of the bucket. Always equal to [name], which has priority.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @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;
}
}
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @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;
}
}
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @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;
onChanged();
return this;
}
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the bucket.
* The name is unique within the platform. For naming limitations and rules, see
* [documentation](/docs/storage/concepts/bucket#naming).
*
*
* string name = 2;
* @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;
onChanged();
return this;
}
private java.lang.Object folderId_ = "";
/**
*
*
* string folder_id = 3;
* @return The bytes for folderId.
*/
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the folder that the bucket belongs to.
*
*
* string folder_id = 3;
* @param value The folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
folderId_ = value;
onChanged();
return this;
}
/**
*
* ID of the folder that the bucket belongs to.
*
*
* string folder_id = 3;
* @return This builder for chaining.
*/
public Builder clearFolderId() {
folderId_ = getDefaultInstance().getFolderId();
onChanged();
return this;
}
/**
*
* ID of the folder that the bucket belongs to.
*
*
* string folder_id = 3;
* @param value The bytes for folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
folderId_ = value;
onChanged();
return this;
}
private yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags anonymousAccessFlags_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags, yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlagsOrBuilder> anonymousAccessFlagsBuilder_;
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 4;
* @return Whether the anonymousAccessFlags field is set.
*/
public boolean hasAnonymousAccessFlags() {
return anonymousAccessFlagsBuilder_ != null || anonymousAccessFlags_ != null;
}
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 4;
*/
public Builder setAnonymousAccessFlags(yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags value) {
if (anonymousAccessFlagsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
anonymousAccessFlags_ = value;
onChanged();
} else {
anonymousAccessFlagsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string default_storage_class = 5;
* @return The bytes for defaultStorageClass.
*/
public com.google.protobuf.ByteString
getDefaultStorageClassBytes() {
java.lang.Object ref = defaultStorageClass_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
defaultStorageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string default_storage_class = 5;
* @param value The defaultStorageClass to set.
* @return This builder for chaining.
*/
public Builder setDefaultStorageClass(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
defaultStorageClass_ = value;
onChanged();
return this;
}
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string default_storage_class = 5;
* @return This builder for chaining.
*/
public Builder clearDefaultStorageClass() {
defaultStorageClass_ = getDefaultInstance().getDefaultStorageClass();
onChanged();
return this;
}
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string default_storage_class = 5;
* @param value The bytes for defaultStorageClass to set.
* @return This builder for chaining.
*/
public Builder setDefaultStorageClassBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
defaultStorageClass_ = value;
onChanged();
return this;
}
private int versioning_ = 0;
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
*
* .yandex.cloud.storage.v1.Versioning versioning = 6;
* @return The enum numeric value on the wire for versioning.
*/
@java.lang.Override public int getVersioningValue() {
return versioning_;
}
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
*
* .yandex.cloud.storage.v1.Versioning versioning = 6;
* @param value The enum numeric value on the wire for versioning to set.
* @return This builder for chaining.
*/
public Builder setVersioningValue(int value) {
versioning_ = value;
onChanged();
return this;
}
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
*
* .yandex.cloud.storage.v1.Versioning versioning = 6;
* @return The versioning.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.Versioning getVersioning() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.Versioning result = yandex.cloud.api.storage.v1.BucketOuterClass.Versioning.valueOf(versioning_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.Versioning.UNRECOGNIZED : result;
}
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
*
* .yandex.cloud.storage.v1.Versioning versioning = 6;
* @param value The versioning to set.
* @return This builder for chaining.
*/
public Builder setVersioning(yandex.cloud.api.storage.v1.BucketOuterClass.Versioning value) {
if (value == null) {
throw new NullPointerException();
}
versioning_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Bucket versioning status.
* For details, see [documentation](/docs/storage/concepts/versioning).
*
*
* .yandex.cloud.storage.v1.Versioning versioning = 6;
* @return This builder for chaining.
*/
public Builder clearVersioning() {
versioning_ = 0;
onChanged();
return this;
}
private long maxSize_ ;
/**
*
* Maximum size of the bucket, in bytes.
* For details, see [documentation](/docs/storage/operations/buckets/limit-max-volume).
*
*
* int64 max_size = 7;
* @return The maxSize.
*/
@java.lang.Override
public long getMaxSize() {
return maxSize_;
}
/**
*
* Maximum size of the bucket, in bytes.
* For details, see [documentation](/docs/storage/operations/buckets/limit-max-volume).
*
*
* int64 max_size = 7;
* @param value The maxSize to set.
* @return This builder for chaining.
*/
public Builder setMaxSize(long value) {
maxSize_ = value;
onChanged();
return this;
}
/**
*
* Maximum size of the bucket, in bytes.
* For details, see [documentation](/docs/storage/operations/buckets/limit-max-volume).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
*
* .google.protobuf.Struct policy = 8;
* @return Whether the policy field is set.
*/
public boolean hasPolicy() {
return policyBuilder_ != null || policy_ != null;
}
/**
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
*
* .google.protobuf.Struct policy = 8;
*/
public Builder setPolicy(com.google.protobuf.Struct value) {
if (policyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policy_ = value;
onChanged();
} else {
policyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* Bucket policies that set permissions for actions with the bucket, its objects, and groups of objects.
* For details, see [documentation](/docs/storage/concepts/policy).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public java.util.List getCorsList() {
if (corsBuilder_ == null) {
return java.util.Collections.unmodifiableList(cors_);
} else {
return corsBuilder_.getMessageList();
}
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public int getCorsCount() {
if (corsBuilder_ == null) {
return cors_.size();
} else {
return corsBuilder_.getCount();
}
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule getCors(int index) {
if (corsBuilder_ == null) {
return cors_.get(index);
} else {
return corsBuilder_.getMessage(index);
}
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public Builder setCors(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule value) {
if (corsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCorsIsMutable();
cors_.set(index, value);
onChanged();
} else {
corsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public Builder setCors(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Builder builderForValue) {
if (corsBuilder_ == null) {
ensureCorsIsMutable();
cors_.set(index, builderForValue.build());
onChanged();
} else {
corsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public Builder addCors(yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule value) {
if (corsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCorsIsMutable();
cors_.add(value);
onChanged();
} else {
corsBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public Builder addCors(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule value) {
if (corsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCorsIsMutable();
cors_.add(index, value);
onChanged();
} else {
corsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public Builder addCors(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Builder builderForValue) {
if (corsBuilder_ == null) {
ensureCorsIsMutable();
cors_.add(index, builderForValue.build());
onChanged();
} else {
corsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Builder getCorsBuilder(
int index) {
return getCorsFieldBuilder().getBuilder(index);
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRuleOrBuilder getCorsOrBuilder(
int index) {
if (corsBuilder_ == null) {
return cors_.get(index); } else {
return corsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public java.util.List extends yandex.cloud.api.storage.v1.BucketOuterClass.CorsRuleOrBuilder>
getCorsOrBuilderList() {
if (corsBuilder_ != null) {
return corsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(cors_);
}
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Builder addCorsBuilder() {
return getCorsFieldBuilder().addBuilder(
yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.getDefaultInstance());
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* repeated .yandex.cloud.storage.v1.CorsRule cors = 11;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Builder addCorsBuilder(
int index) {
return getCorsFieldBuilder().addBuilder(
index, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.getDefaultInstance());
}
/**
*
* List of rules for cross-domain requests to objects in the bucket (cross-origin resource sharing, CORS).
* For details, see [documentation](/docs/storage/concepts/cors).
*
*
* string key = 1;
* @return The bytes for key.
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Key of the bucket tag.
*
*
* string key = 1;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
*
* Key of the bucket tag.
*
*
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
*
* Key of the bucket tag.
*
*
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
private java.lang.Object value_ = "";
/**
*
* Value of the bucket tag.
*
*
* string value = 2;
* @return The value.
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Value of the bucket tag.
*
*
* string value = 2;
* @return The bytes for value.
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Value of the bucket tag.
*
*
* string value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
*
* Value of the bucket tag.
*
*
* string value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
*
* Value of the bucket tag.
*
*
* string value = 2;
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = 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:yandex.cloud.storage.v1.Tag)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.Tag)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.Tag DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.Tag();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Tag getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Tag parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Tag(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.Tag getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ACLOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.ACL)
com.google.protobuf.MessageOrBuilder {
/**
*
*
* repeated .yandex.cloud.storage.v1.ACL.Grant grants = 1;
*/
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.GrantOrBuilder getGrantsOrBuilder(
int index);
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.ACL}
*/
public static final class ACL extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.ACL)
ACLOrBuilder {
private static final long serialVersionUID = 0L;
// Use ACL.newBuilder() to construct.
private ACL(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ACL() {
grants_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ACL();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ACL(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
grants_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
grants_.add(
input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
grants_ = java.util.Collections.unmodifiableList(grants_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ACL_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ACL_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.class, yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Builder.class);
}
public interface GrantOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.ACL.Grant)
com.google.protobuf.MessageOrBuilder {
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for permission.
*/
int getPermissionValue();
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @return The permission.
*/
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission getPermission();
/**
*
* The grantee type for the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.GrantType grant_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for grantType.
*/
int getGrantTypeValue();
/**
*
* ID of the account who is a grantee. Required when the [grant_type] is `GRANT_TYPE_ACCOUNT`.
*
*
* string grantee_id = 3;
* @return The bytes for granteeId.
*/
com.google.protobuf.ByteString
getGranteeIdBytes();
}
/**
*
* A grant resource, used to specify the permission granted and the grantee.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.ACL.Grant}
*/
public static final class Grant extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.ACL.Grant)
GrantOrBuilder {
private static final long serialVersionUID = 0L;
// Use Grant.newBuilder() to construct.
private Grant(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Grant() {
permission_ = 0;
grantType_ = 0;
granteeId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Grant();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Grant(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
permission_ = rawValue;
break;
}
case 16: {
int rawValue = input.readEnum();
grantType_ = rawValue;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
granteeId_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ACL_Grant_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ACL_Grant_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.class, yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.storage.v1.ACL.Grant.Permission}
*/
public enum Permission
implements com.google.protobuf.ProtocolMessageEnum {
/**
* PERMISSION_UNSPECIFIED = 0;
*/
PERMISSION_UNSPECIFIED(0),
/**
*
* Allows grantee the `PERMISSION_WRITE`, `PERMISSION_WRITE_ACP`, `PERMISSION_READ`, and `PERMISSION_READ_ACP`
* on the bucket.
* Maps to `x-amz-grant-full-control` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of
* Amazon S3-compatible HTTP API.
*
* Allows grantee to create new objects in the bucket. For the bucket and object owners of existing objects, also
* allows deletions and overwrites of those objects.
* Maps to `x-amz-grant-write` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of Amazon
* S3-compatible HTTP API.
*
* Allows grantee to write the ACL for the bucket.
* Maps to `x-amz-grant-write-acp` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of
* Amazon S3-compatible HTTP API.
*
* Allows grantee to list the objects in the bucket.
* Maps to `x-amz-grant-read` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of Amazon
* S3-compatible HTTP API.
*
* Allows grantee to read the bucket ACL
* Maps to `x-amz-grant-read-acp` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of
* Amazon S3-compatible HTTP API.
*
*
* PERMISSION_READ_ACP = 5;
*/
PERMISSION_READ_ACP(5),
UNRECOGNIZED(-1),
;
/**
* PERMISSION_UNSPECIFIED = 0;
*/
public static final int PERMISSION_UNSPECIFIED_VALUE = 0;
/**
*
* Allows grantee the `PERMISSION_WRITE`, `PERMISSION_WRITE_ACP`, `PERMISSION_READ`, and `PERMISSION_READ_ACP`
* on the bucket.
* Maps to `x-amz-grant-full-control` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of
* Amazon S3-compatible HTTP API.
*
*
* PERMISSION_FULL_CONTROL = 1;
*/
public static final int PERMISSION_FULL_CONTROL_VALUE = 1;
/**
*
* Allows grantee to create new objects in the bucket. For the bucket and object owners of existing objects, also
* allows deletions and overwrites of those objects.
* Maps to `x-amz-grant-write` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of Amazon
* S3-compatible HTTP API.
*
*
* PERMISSION_WRITE = 2;
*/
public static final int PERMISSION_WRITE_VALUE = 2;
/**
*
* Allows grantee to write the ACL for the bucket.
* Maps to `x-amz-grant-write-acp` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of
* Amazon S3-compatible HTTP API.
*
*
* PERMISSION_WRITE_ACP = 3;
*/
public static final int PERMISSION_WRITE_ACP_VALUE = 3;
/**
*
* Allows grantee to list the objects in the bucket.
* Maps to `x-amz-grant-read` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of Amazon
* S3-compatible HTTP API.
*
*
* PERMISSION_READ = 4;
*/
public static final int PERMISSION_READ_VALUE = 4;
/**
*
* Allows grantee to read the bucket ACL
* Maps to `x-amz-grant-read-acp` header for [bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of
* Amazon S3-compatible HTTP API.
*
*
* PERMISSION_READ_ACP = 5;
*/
public static final int PERMISSION_READ_ACP_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Permission valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Permission forNumber(int value) {
switch (value) {
case 0: return PERMISSION_UNSPECIFIED;
case 1: return PERMISSION_FULL_CONTROL;
case 2: return PERMISSION_WRITE;
case 3: return PERMISSION_WRITE_ACP;
case 4: return PERMISSION_READ;
case 5: return PERMISSION_READ_ACP;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Permission> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Permission findValueByNumber(int number) {
return Permission.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.getDescriptor().getEnumTypes().get(0);
}
private static final Permission[] VALUES = values();
public static Permission valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Permission(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.storage.v1.ACL.Grant.Permission)
}
/**
* Protobuf enum {@code yandex.cloud.storage.v1.ACL.Grant.GrantType}
*/
public enum GrantType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* GRANT_TYPE_UNSPECIFIED = 0;
*/
GRANT_TYPE_UNSPECIFIED(0),
/**
*
* A grantee is an [account on the platform](/docs/iam/concepts/#accounts).
* For this grantee type, you need to specify the user ID in [Bucket.acl.grants.grantee_id] field. To get user ID, see
* [instruction](/docs/iam/operations/users/get).
* Maps to using `id="*"` value for `x-amz-grant-*` header ([bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput)
* method of Amazon S3-compatible HTTP API).
*
* Grantees are all authenticated users, both from your clouds and other users' clouds. Access
* permission to this group allows any account on the platform to access the resource via a signed (authenticated)
* request.
* Maps to using `uri="http://acs.amazonaws.com/groups/global/AuthenticatedUsers"` value for `x-amz-grant-*`
* header ([bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of Amazon S3-compatible HTTP API).
*
* Grantees are all internet users. Access permission to this group allows anyone in the world access to the
* resource via signed (authenticated) or unsigned (anonymous) requests.
* Maps to using `uri="http://acs.amazonaws.com/groups/global/AllUsers"` value for `x-amz-grant-*` header
* ([bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of Amazon S3-compatible HTTP API).
*
*
* GRANT_TYPE_ALL_USERS = 3;
*/
GRANT_TYPE_ALL_USERS(3),
UNRECOGNIZED(-1),
;
/**
* GRANT_TYPE_UNSPECIFIED = 0;
*/
public static final int GRANT_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* A grantee is an [account on the platform](/docs/iam/concepts/#accounts).
* For this grantee type, you need to specify the user ID in [Bucket.acl.grants.grantee_id] field. To get user ID, see
* [instruction](/docs/iam/operations/users/get).
* Maps to using `id="*"` value for `x-amz-grant-*` header ([bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput)
* method of Amazon S3-compatible HTTP API).
*
*
* GRANT_TYPE_ACCOUNT = 1;
*/
public static final int GRANT_TYPE_ACCOUNT_VALUE = 1;
/**
*
* Grantees are all authenticated users, both from your clouds and other users' clouds. Access
* permission to this group allows any account on the platform to access the resource via a signed (authenticated)
* request.
* Maps to using `uri="http://acs.amazonaws.com/groups/global/AuthenticatedUsers"` value for `x-amz-grant-*`
* header ([bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of Amazon S3-compatible HTTP API).
*
*
* GRANT_TYPE_ALL_AUTHENTICATED_USERS = 2;
*/
public static final int GRANT_TYPE_ALL_AUTHENTICATED_USERS_VALUE = 2;
/**
*
* Grantees are all internet users. Access permission to this group allows anyone in the world access to the
* resource via signed (authenticated) or unsigned (anonymous) requests.
* Maps to using `uri="http://acs.amazonaws.com/groups/global/AllUsers"` value for `x-amz-grant-*` header
* ([bucketPutAcl](/docs/storage/s3/api-ref/acl/bucketput) method of Amazon S3-compatible HTTP API).
*
*
* GRANT_TYPE_ALL_USERS = 3;
*/
public static final int GRANT_TYPE_ALL_USERS_VALUE = 3;
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 GrantType 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 GrantType forNumber(int value) {
switch (value) {
case 0: return GRANT_TYPE_UNSPECIFIED;
case 1: return GRANT_TYPE_ACCOUNT;
case 2: return GRANT_TYPE_ALL_AUTHENTICATED_USERS;
case 3: return GRANT_TYPE_ALL_USERS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
GrantType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public GrantType findValueByNumber(int number) {
return GrantType.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 yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.getDescriptor().getEnumTypes().get(1);
}
private static final GrantType[] VALUES = values();
public static GrantType 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 GrantType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.storage.v1.ACL.Grant.GrantType)
}
public static final int PERMISSION_FIELD_NUMBER = 1;
private int permission_;
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for permission.
*/
@java.lang.Override public int getPermissionValue() {
return permission_;
}
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @return The permission.
*/
@java.lang.Override public yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission getPermission() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission result = yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission.valueOf(permission_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission.UNRECOGNIZED : result;
}
public static final int GRANT_TYPE_FIELD_NUMBER = 2;
private int grantType_;
/**
*
* The grantee type for the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.GrantType grant_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for grantType.
*/
@java.lang.Override public int getGrantTypeValue() {
return grantType_;
}
/**
*
* The grantee type for the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.GrantType grant_type = 2 [(.yandex.cloud.required) = true];
* @return The grantType.
*/
@java.lang.Override public yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType getGrantType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType result = yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType.valueOf(grantType_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType.UNRECOGNIZED : result;
}
public static final int GRANTEE_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object granteeId_;
/**
*
* ID of the account who is a grantee. Required when the [grant_type] is `GRANT_TYPE_ACCOUNT`.
*
* A grant resource, used to specify the permission granted and the grantee.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.ACL.Grant}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.ACL.Grant)
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.GrantOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ACL_Grant_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ACL_Grant_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.class, yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
permission_ = 0;
grantType_ = 0;
granteeId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ACL_Grant_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant build() {
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant result = new yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant(this);
result.permission_ = permission_;
result.grantType_ = grantType_;
result.granteeId_ = granteeId_;
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.getDefaultInstance()) return this;
if (other.permission_ != 0) {
setPermissionValue(other.getPermissionValue());
}
if (other.grantType_ != 0) {
setGrantTypeValue(other.getGrantTypeValue());
}
if (!other.getGranteeId().isEmpty()) {
granteeId_ = other.granteeId_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int permission_ = 0;
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for permission.
*/
@java.lang.Override public int getPermissionValue() {
return permission_;
}
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for permission to set.
* @return This builder for chaining.
*/
public Builder setPermissionValue(int value) {
permission_ = value;
onChanged();
return this;
}
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @return The permission.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission getPermission() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission result = yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission.valueOf(permission_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission.UNRECOGNIZED : result;
}
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @param value The permission to set.
* @return This builder for chaining.
*/
public Builder setPermission(yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.Permission value) {
if (value == null) {
throw new NullPointerException();
}
permission_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Permission granted by the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.Permission permission = 1 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearPermission() {
permission_ = 0;
onChanged();
return this;
}
private int grantType_ = 0;
/**
*
* The grantee type for the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.GrantType grant_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for grantType.
*/
@java.lang.Override public int getGrantTypeValue() {
return grantType_;
}
/**
*
* The grantee type for the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.GrantType grant_type = 2 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for grantType to set.
* @return This builder for chaining.
*/
public Builder setGrantTypeValue(int value) {
grantType_ = value;
onChanged();
return this;
}
/**
*
* The grantee type for the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.GrantType grant_type = 2 [(.yandex.cloud.required) = true];
* @return The grantType.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType getGrantType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType result = yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType.valueOf(grantType_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType.UNRECOGNIZED : result;
}
/**
*
* The grantee type for the grant.
*
*
* .yandex.cloud.storage.v1.ACL.Grant.GrantType grant_type = 2 [(.yandex.cloud.required) = true];
* @param value The grantType to set.
* @return This builder for chaining.
*/
public Builder setGrantType(yandex.cloud.api.storage.v1.BucketOuterClass.ACL.Grant.GrantType value) {
if (value == null) {
throw new NullPointerException();
}
grantType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
*
* .google.protobuf.BoolValue config_read = 3;
* @return Whether the configRead field is set.
*/
boolean hasConfigRead();
/**
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
*
* .google.protobuf.BoolValue config_read = 3;
*/
com.google.protobuf.BoolValueOrBuilder getConfigReadOrBuilder();
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.AnonymousAccessFlags}
*/
public static final class AnonymousAccessFlags extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.AnonymousAccessFlags)
AnonymousAccessFlagsOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnonymousAccessFlags.newBuilder() to construct.
private AnonymousAccessFlags(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AnonymousAccessFlags() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AnonymousAccessFlags();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AnonymousAccessFlags(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (read_ != null) {
subBuilder = read_.toBuilder();
}
read_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(read_);
read_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (list_ != null) {
subBuilder = list_.toBuilder();
}
list_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(list_);
list_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (configRead_ != null) {
subBuilder = configRead_.toBuilder();
}
configRead_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(configRead_);
configRead_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_AnonymousAccessFlags_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_AnonymousAccessFlags_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.class, yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.Builder.class);
}
public static final int READ_FIELD_NUMBER = 1;
private com.google.protobuf.BoolValue read_;
/**
*
* Specifies whether public (anonymous) access to read objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue read = 1;
* @return Whether the read field is set.
*/
@java.lang.Override
public boolean hasRead() {
return read_ != null;
}
/**
*
* Specifies whether public (anonymous) access to read objects in the bucket is enabled.
*
* Specifies whether public (anonymous) access to read objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue read = 1;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getReadOrBuilder() {
return getRead();
}
public static final int LIST_FIELD_NUMBER = 2;
private com.google.protobuf.BoolValue list_;
/**
*
* Specifies whether public (anonymous) access to the list of objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue list = 2;
* @return Whether the list field is set.
*/
@java.lang.Override
public boolean hasList() {
return list_ != null;
}
/**
*
* Specifies whether public (anonymous) access to the list of objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue list = 2;
* @return The list.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getList() {
return list_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : list_;
}
/**
*
* Specifies whether public (anonymous) access to the list of objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue list = 2;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getListOrBuilder() {
return getList();
}
public static final int CONFIG_READ_FIELD_NUMBER = 3;
private com.google.protobuf.BoolValue configRead_;
/**
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
*
* .google.protobuf.BoolValue config_read = 3;
* @return Whether the configRead field is set.
*/
@java.lang.Override
public boolean hasConfigRead() {
return configRead_ != null;
}
/**
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
*
* .google.protobuf.BoolValue config_read = 3;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getConfigReadOrBuilder() {
return getConfigRead();
}
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 (read_ != null) {
output.writeMessage(1, getRead());
}
if (list_ != null) {
output.writeMessage(2, getList());
}
if (configRead_ != null) {
output.writeMessage(3, getConfigRead());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (read_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getRead());
}
if (list_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getList());
}
if (configRead_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getConfigRead());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags other = (yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags) obj;
if (hasRead() != other.hasRead()) return false;
if (hasRead()) {
if (!getRead()
.equals(other.getRead())) return false;
}
if (hasList() != other.hasList()) return false;
if (hasList()) {
if (!getList()
.equals(other.getList())) return false;
}
if (hasConfigRead() != other.hasConfigRead()) return false;
if (hasConfigRead()) {
if (!getConfigRead()
.equals(other.getConfigRead())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasRead()) {
hash = (37 * hash) + READ_FIELD_NUMBER;
hash = (53 * hash) + getRead().hashCode();
}
if (hasList()) {
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getList().hashCode();
}
if (hasConfigRead()) {
hash = (37 * hash) + CONFIG_READ_FIELD_NUMBER;
hash = (53 * hash) + getConfigRead().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags 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 yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags 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 yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags 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(yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags 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;
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.AnonymousAccessFlags}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.AnonymousAccessFlags)
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlagsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_AnonymousAccessFlags_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_AnonymousAccessFlags_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.class, yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (readBuilder_ == null) {
read_ = null;
} else {
read_ = null;
readBuilder_ = null;
}
if (listBuilder_ == null) {
list_ = null;
} else {
list_ = null;
listBuilder_ = null;
}
if (configReadBuilder_ == null) {
configRead_ = null;
} else {
configRead_ = null;
configReadBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_AnonymousAccessFlags_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags build() {
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags result = new yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags(this);
if (readBuilder_ == null) {
result.read_ = read_;
} else {
result.read_ = readBuilder_.build();
}
if (listBuilder_ == null) {
result.list_ = list_;
} else {
result.list_ = listBuilder_.build();
}
if (configReadBuilder_ == null) {
result.configRead_ = configRead_;
} else {
result.configRead_ = configReadBuilder_.build();
}
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags.getDefaultInstance()) return this;
if (other.hasRead()) {
mergeRead(other.getRead());
}
if (other.hasList()) {
mergeList(other.getList());
}
if (other.hasConfigRead()) {
mergeConfigRead(other.getConfigRead());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.BoolValue read_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> readBuilder_;
/**
*
* Specifies whether public (anonymous) access to read objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue read = 1;
* @return Whether the read field is set.
*/
public boolean hasRead() {
return readBuilder_ != null || read_ != null;
}
/**
*
* Specifies whether public (anonymous) access to read objects in the bucket is enabled.
*
* Specifies whether public (anonymous) access to the list of objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue list = 2;
* @return Whether the list field is set.
*/
public boolean hasList() {
return listBuilder_ != null || list_ != null;
}
/**
*
* Specifies whether public (anonymous) access to the list of objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue list = 2;
* @return The list.
*/
public com.google.protobuf.BoolValue getList() {
if (listBuilder_ == null) {
return list_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : list_;
} else {
return listBuilder_.getMessage();
}
}
/**
*
* Specifies whether public (anonymous) access to the list of objects in the bucket is enabled.
*
*
* .google.protobuf.BoolValue list = 2;
*/
public Builder setList(com.google.protobuf.BoolValue value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
list_ = value;
onChanged();
} else {
listBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies whether public (anonymous) access to the list of objects in the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
*
* .google.protobuf.BoolValue config_read = 3;
* @return Whether the configRead field is set.
*/
public boolean hasConfigRead() {
return configReadBuilder_ != null || configRead_ != null;
}
/**
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
*
* .google.protobuf.BoolValue config_read = 3;
*/
public Builder setConfigRead(com.google.protobuf.BoolValue value) {
if (configReadBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
configRead_ = value;
onChanged();
} else {
configReadBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
* Specifies whether public (anonymous) access to read [CORS](/docs/storage/concepts/cors),
* [static website hosting](/docs/storage/concepts/hosting), and
* [object lifecycles](/docs/storage/concepts/lifecycles) settings of the bucket is enabled.
*
*
* .google.protobuf.BoolValue config_read = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getConfigReadFieldBuilder() {
if (configReadBuilder_ == null) {
configReadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getConfigRead(),
getParentForChildren(),
isClean());
configRead_ = null;
}
return configReadBuilder_;
}
@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:yandex.cloud.storage.v1.AnonymousAccessFlags)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.AnonymousAccessFlags)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AnonymousAccessFlags parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnonymousAccessFlags(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CorsRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.CorsRule)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the CORS rule.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* ID of the CORS rule.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return A list containing the allowedMethods.
*/
java.util.List getAllowedMethodsList();
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return The count of allowedMethods.
*/
int getAllowedMethodsCount();
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param index The index of the element to return.
* @return The allowedMethods at the given index.
*/
yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method getAllowedMethods(int index);
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return A list containing the enum numeric values on the wire for allowedMethods.
*/
java.util.List
getAllowedMethodsValueList();
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param index The index of the value to return.
* @return The enum numeric value on the wire of allowedMethods at the given index.
*/
int getAllowedMethodsValue(int index);
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @return A list containing the allowedHeaders.
*/
java.util.List
getAllowedHeadersList();
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @return The count of allowedHeaders.
*/
int getAllowedHeadersCount();
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param index The index of the element to return.
* @return The allowedHeaders at the given index.
*/
java.lang.String getAllowedHeaders(int index);
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param index The index of the value to return.
* @return The bytes of the allowedHeaders at the given index.
*/
com.google.protobuf.ByteString
getAllowedHeadersBytes(int index);
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @return A list containing the allowedOrigins.
*/
java.util.List
getAllowedOriginsList();
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @return The count of allowedOrigins.
*/
int getAllowedOriginsCount();
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param index The index of the element to return.
* @return The allowedOrigins at the given index.
*/
java.lang.String getAllowedOrigins(int index);
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param index The index of the value to return.
* @return The bytes of the allowedOrigins at the given index.
*/
com.google.protobuf.ByteString
getAllowedOriginsBytes(int index);
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @return A list containing the exposeHeaders.
*/
java.util.List
getExposeHeadersList();
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @return The count of exposeHeaders.
*/
int getExposeHeadersCount();
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param index The index of the element to return.
* @return The exposeHeaders at the given index.
*/
java.lang.String getExposeHeaders(int index);
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param index The index of the value to return.
* @return The bytes of the exposeHeaders at the given index.
*/
com.google.protobuf.ByteString
getExposeHeadersBytes(int index);
/**
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
*
* .google.protobuf.Int64Value max_age_seconds = 6;
* @return Whether the maxAgeSeconds field is set.
*/
boolean hasMaxAgeSeconds();
/**
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* A CORS rule resource.
* For details about the concept, see [documentation](/docs/storage/concepts/cors).
*
*
* Protobuf type {@code yandex.cloud.storage.v1.CorsRule}
*/
public static final class CorsRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.CorsRule)
CorsRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use CorsRule.newBuilder() to construct.
private CorsRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CorsRule() {
id_ = "";
allowedMethods_ = java.util.Collections.emptyList();
allowedHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
allowedOrigins_ = com.google.protobuf.LazyStringArrayList.EMPTY;
exposeHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CorsRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CorsRule(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
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();
id_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
allowedMethods_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
allowedMethods_.add(rawValue);
break;
}
case 18: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
allowedMethods_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
allowedMethods_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
allowedHeaders_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
allowedHeaders_.add(s);
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
allowedOrigins_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
allowedOrigins_.add(s);
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
exposeHeaders_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
exposeHeaders_.add(s);
break;
}
case 50: {
com.google.protobuf.Int64Value.Builder subBuilder = null;
if (maxAgeSeconds_ != null) {
subBuilder = maxAgeSeconds_.toBuilder();
}
maxAgeSeconds_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxAgeSeconds_);
maxAgeSeconds_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
allowedMethods_ = java.util.Collections.unmodifiableList(allowedMethods_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
allowedHeaders_ = allowedHeaders_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
allowedOrigins_ = allowedOrigins_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
exposeHeaders_ = exposeHeaders_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_CorsRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_CorsRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.class, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Builder.class);
}
/**
*
* List of HTTP methods that are allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against the
* list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* METHOD_DELETE = 5;
*/
METHOD_DELETE(5),
UNRECOGNIZED(-1),
;
/**
* METHOD_UNSPECIFIED = 0;
*/
public static final int METHOD_UNSPECIFIED_VALUE = 0;
/**
*
* HTTP `GET` method.
*
*
* METHOD_GET = 1;
*/
public static final int METHOD_GET_VALUE = 1;
/**
*
* HTTP `HEAD` method.
*
*
* METHOD_HEAD = 2;
*/
public static final int METHOD_HEAD_VALUE = 2;
/**
*
* HTTP `POST` method.
*
*
* METHOD_POST = 3;
*/
public static final int METHOD_POST_VALUE = 3;
/**
*
* HTTP `PUT` method.
*
*
* METHOD_PUT = 4;
*/
public static final int METHOD_PUT_VALUE = 4;
/**
*
* HTTP `DELETE` method.
*
*
* METHOD_DELETE = 5;
*/
public static final int METHOD_DELETE_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Method 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 Method forNumber(int value) {
switch (value) {
case 0: return METHOD_UNSPECIFIED;
case 1: return METHOD_GET;
case 2: return METHOD_HEAD;
case 3: return METHOD_POST;
case 4: return METHOD_PUT;
case 5: return METHOD_DELETE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Method> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Method findValueByNumber(int number) {
return Method.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 yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.getDescriptor().getEnumTypes().get(0);
}
private static final Method[] VALUES = values();
public static Method 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 Method(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.storage.v1.CorsRule.Method)
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* ID of the CORS rule.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
* ID of the CORS rule.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALLOWED_METHODS_FIELD_NUMBER = 2;
private java.util.List allowedMethods_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method> allowedMethods_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method>() {
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method result = yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method.valueOf(from);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method.UNRECOGNIZED : result;
}
};
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return A list containing the allowedMethods.
*/
@java.lang.Override
public java.util.List getAllowedMethodsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method>(allowedMethods_, allowedMethods_converter_);
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return The count of allowedMethods.
*/
@java.lang.Override
public int getAllowedMethodsCount() {
return allowedMethods_.size();
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param index The index of the element to return.
* @return The allowedMethods at the given index.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method getAllowedMethods(int index) {
return allowedMethods_converter_.convert(allowedMethods_.get(index));
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return A list containing the enum numeric values on the wire for allowedMethods.
*/
@java.lang.Override
public java.util.List
getAllowedMethodsValueList() {
return allowedMethods_;
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param index The index of the value to return.
* @return The enum numeric value on the wire of allowedMethods at the given index.
*/
@java.lang.Override
public int getAllowedMethodsValue(int index) {
return allowedMethods_.get(index);
}
private int allowedMethodsMemoizedSerializedSize;
public static final int ALLOWED_HEADERS_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList allowedHeaders_;
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @return A list containing the allowedHeaders.
*/
public com.google.protobuf.ProtocolStringList
getAllowedHeadersList() {
return allowedHeaders_;
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @return The count of allowedHeaders.
*/
public int getAllowedHeadersCount() {
return allowedHeaders_.size();
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param index The index of the element to return.
* @return The allowedHeaders at the given index.
*/
public java.lang.String getAllowedHeaders(int index) {
return allowedHeaders_.get(index);
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param index The index of the value to return.
* @return The bytes of the allowedHeaders at the given index.
*/
public com.google.protobuf.ByteString
getAllowedHeadersBytes(int index) {
return allowedHeaders_.getByteString(index);
}
public static final int ALLOWED_ORIGINS_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList allowedOrigins_;
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @return A list containing the allowedOrigins.
*/
public com.google.protobuf.ProtocolStringList
getAllowedOriginsList() {
return allowedOrigins_;
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @return The count of allowedOrigins.
*/
public int getAllowedOriginsCount() {
return allowedOrigins_.size();
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param index The index of the element to return.
* @return The allowedOrigins at the given index.
*/
public java.lang.String getAllowedOrigins(int index) {
return allowedOrigins_.get(index);
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param index The index of the value to return.
* @return The bytes of the allowedOrigins at the given index.
*/
public com.google.protobuf.ByteString
getAllowedOriginsBytes(int index) {
return allowedOrigins_.getByteString(index);
}
public static final int EXPOSE_HEADERS_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList exposeHeaders_;
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @return A list containing the exposeHeaders.
*/
public com.google.protobuf.ProtocolStringList
getExposeHeadersList() {
return exposeHeaders_;
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @return The count of exposeHeaders.
*/
public int getExposeHeadersCount() {
return exposeHeaders_.size();
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param index The index of the element to return.
* @return The exposeHeaders at the given index.
*/
public java.lang.String getExposeHeaders(int index) {
return exposeHeaders_.get(index);
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param index The index of the value to return.
* @return The bytes of the exposeHeaders at the given index.
*/
public com.google.protobuf.ByteString
getExposeHeadersBytes(int index) {
return exposeHeaders_.getByteString(index);
}
public static final int MAX_AGE_SECONDS_FIELD_NUMBER = 6;
private com.google.protobuf.Int64Value maxAgeSeconds_;
/**
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
*
* .google.protobuf.Int64Value max_age_seconds = 6;
* @return Whether the maxAgeSeconds field is set.
*/
@java.lang.Override
public boolean hasMaxAgeSeconds() {
return maxAgeSeconds_ != null;
}
/**
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
*
* .google.protobuf.Int64Value max_age_seconds = 6;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getMaxAgeSecondsOrBuilder() {
return getMaxAgeSeconds();
}
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();
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (getAllowedMethodsList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(allowedMethodsMemoizedSerializedSize);
}
for (int i = 0; i < allowedMethods_.size(); i++) {
output.writeEnumNoTag(allowedMethods_.get(i));
}
for (int i = 0; i < allowedHeaders_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, allowedHeaders_.getRaw(i));
}
for (int i = 0; i < allowedOrigins_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, allowedOrigins_.getRaw(i));
}
for (int i = 0; i < exposeHeaders_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, exposeHeaders_.getRaw(i));
}
if (maxAgeSeconds_ != null) {
output.writeMessage(6, getMaxAgeSeconds());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
{
int dataSize = 0;
for (int i = 0; i < allowedMethods_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(allowedMethods_.get(i));
}
size += dataSize;
if (!getAllowedMethodsList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}allowedMethodsMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < allowedHeaders_.size(); i++) {
dataSize += computeStringSizeNoTag(allowedHeaders_.getRaw(i));
}
size += dataSize;
size += 1 * getAllowedHeadersList().size();
}
{
int dataSize = 0;
for (int i = 0; i < allowedOrigins_.size(); i++) {
dataSize += computeStringSizeNoTag(allowedOrigins_.getRaw(i));
}
size += dataSize;
size += 1 * getAllowedOriginsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < exposeHeaders_.size(); i++) {
dataSize += computeStringSizeNoTag(exposeHeaders_.getRaw(i));
}
size += dataSize;
size += 1 * getExposeHeadersList().size();
}
if (maxAgeSeconds_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getMaxAgeSeconds());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule other = (yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule) obj;
if (!getId()
.equals(other.getId())) return false;
if (!allowedMethods_.equals(other.allowedMethods_)) return false;
if (!getAllowedHeadersList()
.equals(other.getAllowedHeadersList())) return false;
if (!getAllowedOriginsList()
.equals(other.getAllowedOriginsList())) return false;
if (!getExposeHeadersList()
.equals(other.getExposeHeadersList())) return false;
if (hasMaxAgeSeconds() != other.hasMaxAgeSeconds()) return false;
if (hasMaxAgeSeconds()) {
if (!getMaxAgeSeconds()
.equals(other.getMaxAgeSeconds())) return false;
}
if (!unknownFields.equals(other.unknownFields)) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (getAllowedMethodsCount() > 0) {
hash = (37 * hash) + ALLOWED_METHODS_FIELD_NUMBER;
hash = (53 * hash) + allowedMethods_.hashCode();
}
if (getAllowedHeadersCount() > 0) {
hash = (37 * hash) + ALLOWED_HEADERS_FIELD_NUMBER;
hash = (53 * hash) + getAllowedHeadersList().hashCode();
}
if (getAllowedOriginsCount() > 0) {
hash = (37 * hash) + ALLOWED_ORIGINS_FIELD_NUMBER;
hash = (53 * hash) + getAllowedOriginsList().hashCode();
}
if (getExposeHeadersCount() > 0) {
hash = (37 * hash) + EXPOSE_HEADERS_FIELD_NUMBER;
hash = (53 * hash) + getExposeHeadersList().hashCode();
}
if (hasMaxAgeSeconds()) {
hash = (37 * hash) + MAX_AGE_SECONDS_FIELD_NUMBER;
hash = (53 * hash) + getMaxAgeSeconds().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule 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 yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule 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 yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule 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(yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule 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;
}
/**
*
* A CORS rule resource.
* For details about the concept, see [documentation](/docs/storage/concepts/cors).
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the CORS rule.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the CORS rule.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* ID of the CORS rule.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* ID of the CORS rule.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.util.List allowedMethods_ =
java.util.Collections.emptyList();
private void ensureAllowedMethodsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
allowedMethods_ = new java.util.ArrayList(allowedMethods_);
bitField0_ |= 0x00000001;
}
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return A list containing the allowedMethods.
*/
public java.util.List getAllowedMethodsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method>(allowedMethods_, allowedMethods_converter_);
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return The count of allowedMethods.
*/
public int getAllowedMethodsCount() {
return allowedMethods_.size();
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param index The index of the element to return.
* @return The allowedMethods at the given index.
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method getAllowedMethods(int index) {
return allowedMethods_converter_.convert(allowedMethods_.get(index));
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param index The index to set the value at.
* @param value The allowedMethods to set.
* @return This builder for chaining.
*/
public Builder setAllowedMethods(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method value) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedMethodsIsMutable();
allowedMethods_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param value The allowedMethods to add.
* @return This builder for chaining.
*/
public Builder addAllowedMethods(yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method value) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedMethodsIsMutable();
allowedMethods_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param values The allowedMethods to add.
* @return This builder for chaining.
*/
public Builder addAllAllowedMethods(
java.lang.Iterable extends yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method> values) {
ensureAllowedMethodsIsMutable();
for (yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule.Method value : values) {
allowedMethods_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @return A list containing the enum numeric values on the wire for allowedMethods.
*/
public java.util.List
getAllowedMethodsValueList() {
return java.util.Collections.unmodifiableList(allowedMethods_);
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param index The index of the value to return.
* @return The enum numeric value on the wire of allowedMethods at the given index.
*/
public int getAllowedMethodsValue(int index) {
return allowedMethods_.get(index);
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param index The index of the value to return.
* @return The enum numeric value on the wire of allowedMethods at the given index.
* @return This builder for chaining.
*/
public Builder setAllowedMethodsValue(
int index, int value) {
ensureAllowedMethodsIsMutable();
allowedMethods_.set(index, value);
onChanged();
return this;
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param value The enum numeric value on the wire for allowedMethods to add.
* @return This builder for chaining.
*/
public Builder addAllowedMethodsValue(int value) {
ensureAllowedMethodsIsMutable();
allowedMethods_.add(value);
onChanged();
return this;
}
/**
*
* List of HTTP methods allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Method` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified method is checked against
* the list of the allowed methods. If there is a match, all the allowed methods are listed in the
* `Access-Control-Allow-Methods` header of the response.
*
*
* repeated .yandex.cloud.storage.v1.CorsRule.Method allowed_methods = 2 [(.yandex.cloud.size) = ">0", (.yandex.cloud.unique) = true];
* @param values The enum numeric values on the wire for allowedMethods to add.
* @return This builder for chaining.
*/
public Builder addAllAllowedMethodsValue(
java.lang.Iterable values) {
ensureAllowedMethodsIsMutable();
for (int value : values) {
allowedMethods_.add(value);
}
onChanged();
return this;
}
private com.google.protobuf.LazyStringList allowedHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureAllowedHeadersIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
allowedHeaders_ = new com.google.protobuf.LazyStringArrayList(allowedHeaders_);
bitField0_ |= 0x00000002;
}
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @return A list containing the allowedHeaders.
*/
public com.google.protobuf.ProtocolStringList
getAllowedHeadersList() {
return allowedHeaders_.getUnmodifiableView();
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @return The count of allowedHeaders.
*/
public int getAllowedHeadersCount() {
return allowedHeaders_.size();
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param index The index of the element to return.
* @return The allowedHeaders at the given index.
*/
public java.lang.String getAllowedHeaders(int index) {
return allowedHeaders_.get(index);
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param index The index of the value to return.
* @return The bytes of the allowedHeaders at the given index.
*/
public com.google.protobuf.ByteString
getAllowedHeadersBytes(int index) {
return allowedHeaders_.getByteString(index);
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param index The index to set the value at.
* @param value The allowedHeaders to set.
* @return This builder for chaining.
*/
public Builder setAllowedHeaders(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedHeadersIsMutable();
allowedHeaders_.set(index, value);
onChanged();
return this;
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param value The allowedHeaders to add.
* @return This builder for chaining.
*/
public Builder addAllowedHeaders(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedHeadersIsMutable();
allowedHeaders_.add(value);
onChanged();
return this;
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param values The allowedHeaders to add.
* @return This builder for chaining.
*/
public Builder addAllAllowedHeaders(
java.lang.Iterable values) {
ensureAllowedHeadersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, allowedHeaders_);
onChanged();
return this;
}
/**
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
* List of HTTP headers allowed by the CORS rule.
* When a client sends a CORS-preflight `options` request with the `Access-Control-Request-Headers` header (see
* [S3-compatible API reference](/docs/storage/s3/api-ref/object/options)), the specified headers are checked against
* the list of the allowed headers. If there is a match, the specified headers that are allowed are listed in the
* `Access-Control-Allow-Headers` header of the response.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `x-amz-*` value will allow all Amazon S3-compatible headers.
*
*
* repeated string allowed_headers = 3;
* @param value The bytes of the allowedHeaders to add.
* @return This builder for chaining.
*/
public Builder addAllowedHeadersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureAllowedHeadersIsMutable();
allowedHeaders_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList allowedOrigins_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureAllowedOriginsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
allowedOrigins_ = new com.google.protobuf.LazyStringArrayList(allowedOrigins_);
bitField0_ |= 0x00000004;
}
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @return A list containing the allowedOrigins.
*/
public com.google.protobuf.ProtocolStringList
getAllowedOriginsList() {
return allowedOrigins_.getUnmodifiableView();
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @return The count of allowedOrigins.
*/
public int getAllowedOriginsCount() {
return allowedOrigins_.size();
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param index The index of the element to return.
* @return The allowedOrigins at the given index.
*/
public java.lang.String getAllowedOrigins(int index) {
return allowedOrigins_.get(index);
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param index The index of the value to return.
* @return The bytes of the allowedOrigins at the given index.
*/
public com.google.protobuf.ByteString
getAllowedOriginsBytes(int index) {
return allowedOrigins_.getByteString(index);
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param index The index to set the value at.
* @param value The allowedOrigins to set.
* @return This builder for chaining.
*/
public Builder setAllowedOrigins(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedOriginsIsMutable();
allowedOrigins_.set(index, value);
onChanged();
return this;
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param value The allowedOrigins to add.
* @return This builder for chaining.
*/
public Builder addAllowedOrigins(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAllowedOriginsIsMutable();
allowedOrigins_.add(value);
onChanged();
return this;
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param values The allowedOrigins to add.
* @return This builder for chaining.
*/
public Builder addAllAllowedOrigins(
java.lang.Iterable values) {
ensureAllowedOriginsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, allowedOrigins_);
onChanged();
return this;
}
/**
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
* List of request origins allowed by the CORS rule.
* Each string in the list can contain at most one `*` wildcard character that matches 0 or more characters.
* For example, `http://*.example.com` value will allow requests originating from all subdomains of `example.com`.
*
*
* repeated string allowed_origins = 4 [(.yandex.cloud.size) = ">0"];
* @param value The bytes of the allowedOrigins to add.
* @return This builder for chaining.
*/
public Builder addAllowedOriginsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureAllowedOriginsIsMutable();
allowedOrigins_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList exposeHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureExposeHeadersIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
exposeHeaders_ = new com.google.protobuf.LazyStringArrayList(exposeHeaders_);
bitField0_ |= 0x00000008;
}
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @return A list containing the exposeHeaders.
*/
public com.google.protobuf.ProtocolStringList
getExposeHeadersList() {
return exposeHeaders_.getUnmodifiableView();
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @return The count of exposeHeaders.
*/
public int getExposeHeadersCount() {
return exposeHeaders_.size();
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param index The index of the element to return.
* @return The exposeHeaders at the given index.
*/
public java.lang.String getExposeHeaders(int index) {
return exposeHeaders_.get(index);
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param index The index of the value to return.
* @return The bytes of the exposeHeaders at the given index.
*/
public com.google.protobuf.ByteString
getExposeHeadersBytes(int index) {
return exposeHeaders_.getByteString(index);
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param index The index to set the value at.
* @param value The exposeHeaders to set.
* @return This builder for chaining.
*/
public Builder setExposeHeaders(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExposeHeadersIsMutable();
exposeHeaders_.set(index, value);
onChanged();
return this;
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param value The exposeHeaders to add.
* @return This builder for chaining.
*/
public Builder addExposeHeaders(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExposeHeadersIsMutable();
exposeHeaders_.add(value);
onChanged();
return this;
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param values The exposeHeaders to add.
* @return This builder for chaining.
*/
public Builder addAllExposeHeaders(
java.lang.Iterable values) {
ensureExposeHeadersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, exposeHeaders_);
onChanged();
return this;
}
/**
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
* List of headers contained in responses to CORS requests that can be accessed by applications.
*
*
* repeated string expose_headers = 5;
* @param value The bytes of the exposeHeaders to add.
* @return This builder for chaining.
*/
public Builder addExposeHeadersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureExposeHeadersIsMutable();
exposeHeaders_.add(value);
onChanged();
return this;
}
private com.google.protobuf.Int64Value maxAgeSeconds_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> maxAgeSecondsBuilder_;
/**
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
*
* .google.protobuf.Int64Value max_age_seconds = 6;
* @return Whether the maxAgeSeconds field is set.
*/
public boolean hasMaxAgeSeconds() {
return maxAgeSecondsBuilder_ != null || maxAgeSeconds_ != null;
}
/**
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
*
* .google.protobuf.Int64Value max_age_seconds = 6;
*/
public Builder setMaxAgeSeconds(com.google.protobuf.Int64Value value) {
if (maxAgeSecondsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxAgeSeconds_ = value;
onChanged();
} else {
maxAgeSecondsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
* Time in seconds that a client can cache the response to a CORS-preflight request as identified by the
* object requested, the HTTP method, and the origin.
*
*
* .google.protobuf.Int64Value max_age_seconds = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>
getMaxAgeSecondsFieldBuilder() {
if (maxAgeSecondsBuilder_ == null) {
maxAgeSecondsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>(
getMaxAgeSeconds(),
getParentForChildren(),
isClean());
maxAgeSeconds_ = null;
}
return maxAgeSecondsBuilder_;
}
@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:yandex.cloud.storage.v1.CorsRule)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.CorsRule)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CorsRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CorsRule(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CorsRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface WebsiteSettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.WebsiteSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @return The index.
*/
java.lang.String getIndex();
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @return The bytes for index.
*/
com.google.protobuf.ByteString
getIndexBytes();
/**
*
* Key of the error page object that is returned when an error occurs.
*
* Key of the error page object that is returned when an error occurs.
*
*
* string error = 2;
* @return The bytes for error.
*/
com.google.protobuf.ByteString
getErrorBytes();
/**
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Scheme redirect_all_requests = 3;
* @return Whether the redirectAllRequests field is set.
*/
boolean hasRedirectAllRequests();
/**
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
*
* repeated .yandex.cloud.storage.v1.WebsiteSettings.RoutingRule routing_rules = 4;
*/
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RoutingRuleOrBuilder getRoutingRulesOrBuilder(
int index);
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.WebsiteSettings}
*/
public static final class WebsiteSettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.WebsiteSettings)
WebsiteSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use WebsiteSettings.newBuilder() to construct.
private WebsiteSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WebsiteSettings() {
index_ = "";
error_ = "";
routingRules_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new WebsiteSettings();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WebsiteSettings(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
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();
index_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
error_ = s;
break;
}
case 26: {
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.Builder subBuilder = null;
if (redirectAllRequests_ != null) {
subBuilder = redirectAllRequests_.toBuilder();
}
redirectAllRequests_ = input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(redirectAllRequests_);
redirectAllRequests_ = subBuilder.buildPartial();
}
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
routingRules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
routingRules_.add(
input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RoutingRule.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
routingRules_ = java.util.Collections.unmodifiableList(routingRules_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.class, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.storage.v1.WebsiteSettings.Protocol}
*/
public enum Protocol
implements com.google.protobuf.ProtocolMessageEnum {
/**
* PROTOCOL_UNSPECIFIED = 0;
*/
PROTOCOL_UNSPECIFIED(0),
/**
*
* `http` scheme.
*
*
* PROTOCOL_HTTP = 1;
*/
PROTOCOL_HTTP(1),
/**
*
* `https` scheme.
*
*
* PROTOCOL_HTTPS = 2;
*/
PROTOCOL_HTTPS(2),
UNRECOGNIZED(-1),
;
/**
* PROTOCOL_UNSPECIFIED = 0;
*/
public static final int PROTOCOL_UNSPECIFIED_VALUE = 0;
/**
*
* `http` scheme.
*
*
* PROTOCOL_HTTP = 1;
*/
public static final int PROTOCOL_HTTP_VALUE = 1;
/**
*
* `https` scheme.
*
*
* PROTOCOL_HTTPS = 2;
*/
public static final int PROTOCOL_HTTPS_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 Protocol 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 Protocol forNumber(int value) {
switch (value) {
case 0: return PROTOCOL_UNSPECIFIED;
case 1: return PROTOCOL_HTTP;
case 2: return PROTOCOL_HTTPS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Protocol> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Protocol findValueByNumber(int number) {
return Protocol.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 yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.getDescriptor().getEnumTypes().get(0);
}
private static final Protocol[] VALUES = values();
public static Protocol 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 Protocol(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.storage.v1.WebsiteSettings.Protocol)
}
public interface SchemeOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.WebsiteSettings.Scheme)
com.google.protobuf.MessageOrBuilder {
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 1;
* @return The enum numeric value on the wire for protocol.
*/
int getProtocolValue();
/**
*
*
* string hostname = 2;
* @return The bytes for hostname.
*/
com.google.protobuf.ByteString
getHostnameBytes();
}
/**
*
* A configuration resource for redirecting all requests sent to the website.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.WebsiteSettings.Scheme}
*/
public static final class Scheme extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.WebsiteSettings.Scheme)
SchemeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Scheme.newBuilder() to construct.
private Scheme(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Scheme() {
protocol_ = 0;
hostname_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Scheme();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Scheme(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
protocol_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
hostname_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_Scheme_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_Scheme_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.class, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.Builder.class);
}
public static final int PROTOCOL_FIELD_NUMBER = 1;
private int protocol_;
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 1;
* @return The enum numeric value on the wire for protocol.
*/
@java.lang.Override public int getProtocolValue() {
return protocol_;
}
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 1;
* @return The protocol.
*/
@java.lang.Override public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol getProtocol() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol result = yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.valueOf(protocol_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.UNRECOGNIZED : result;
}
public static final int HOSTNAME_FIELD_NUMBER = 2;
private volatile java.lang.Object hostname_;
/**
*
*
* string hostname = 2;
* @return The bytes for hostname.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHostnameBytes() {
java.lang.Object ref = hostname_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hostname_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (protocol_ != yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.PROTOCOL_UNSPECIFIED.getNumber()) {
output.writeEnum(1, protocol_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostname_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hostname_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (protocol_ != yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.PROTOCOL_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, protocol_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostname_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hostname_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme other = (yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme) obj;
if (protocol_ != other.protocol_) return false;
if (!getHostname()
.equals(other.getHostname())) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + PROTOCOL_FIELD_NUMBER;
hash = (53 * hash) + protocol_;
hash = (37 * hash) + HOSTNAME_FIELD_NUMBER;
hash = (53 * hash) + getHostname().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme 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 yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme 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 yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme 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(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme 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;
}
/**
*
* A configuration resource for redirecting all requests sent to the website.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.WebsiteSettings.Scheme}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.WebsiteSettings.Scheme)
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.SchemeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_Scheme_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_Scheme_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.class, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
protocol_ = 0;
hostname_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_Scheme_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme build() {
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme result = new yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme(this);
result.protocol_ = protocol_;
result.hostname_ = hostname_;
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.getDefaultInstance()) return this;
if (other.protocol_ != 0) {
setProtocolValue(other.getProtocolValue());
}
if (!other.getHostname().isEmpty()) {
hostname_ = other.hostname_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int protocol_ = 0;
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 1;
* @return The enum numeric value on the wire for protocol.
*/
@java.lang.Override public int getProtocolValue() {
return protocol_;
}
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 1;
* @param value The enum numeric value on the wire for protocol to set.
* @return This builder for chaining.
*/
public Builder setProtocolValue(int value) {
protocol_ = value;
onChanged();
return this;
}
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 1;
* @return The protocol.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol getProtocol() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol result = yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.valueOf(protocol_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.UNRECOGNIZED : result;
}
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 1;
* @param value The protocol to set.
* @return This builder for chaining.
*/
public Builder setProtocol(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol value) {
if (value == null) {
throw new NullPointerException();
}
protocol_ = value.getNumber();
onChanged();
return this;
}
/**
*
* HTTP status code of the redirect response.
* Default value: `"301"`.
*
*
* string http_redirect_code = 2 [(.yandex.cloud.pattern) = "3(0[1-9]|[1-9][0-9])"];
* @return The bytes for httpRedirectCode.
*/
com.google.protobuf.ByteString
getHttpRedirectCodeBytes();
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 3;
* @return The enum numeric value on the wire for protocol.
*/
int getProtocolValue();
/**
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
*
* string replace_key_prefix_with = 4;
* @return The bytes for replaceKeyPrefixWith.
*/
com.google.protobuf.ByteString
getReplaceKeyPrefixWithBytes();
/**
*
* New object key.
* At most one of [replace_key_with] and [replace_key_prefix_with] can be specified.
*
* HTTP status code of the redirect response.
* Default value: `"301"`.
*
*
* string http_redirect_code = 2 [(.yandex.cloud.pattern) = "3(0[1-9]|[1-9][0-9])"];
* @return The bytes for httpRedirectCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHttpRedirectCodeBytes() {
java.lang.Object ref = httpRedirectCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
httpRedirectCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROTOCOL_FIELD_NUMBER = 3;
private int protocol_;
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 3;
* @return The enum numeric value on the wire for protocol.
*/
@java.lang.Override public int getProtocolValue() {
return protocol_;
}
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 3;
* @return The protocol.
*/
@java.lang.Override public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol getProtocol() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol result = yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.valueOf(protocol_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.UNRECOGNIZED : result;
}
public static final int REPLACE_KEY_PREFIX_WITH_FIELD_NUMBER = 4;
private volatile java.lang.Object replaceKeyPrefixWith_;
/**
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
*
* string replace_key_prefix_with = 4;
* @return The bytes for replaceKeyPrefixWith.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getReplaceKeyPrefixWithBytes() {
java.lang.Object ref = replaceKeyPrefixWith_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
replaceKeyPrefixWith_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REPLACE_KEY_WITH_FIELD_NUMBER = 5;
private volatile java.lang.Object replaceKeyWith_;
/**
*
* New object key.
* At most one of [replace_key_with] and [replace_key_prefix_with] can be specified.
*
* HTTP status code of the redirect response.
* Default value: `"301"`.
*
*
* string http_redirect_code = 2 [(.yandex.cloud.pattern) = "3(0[1-9]|[1-9][0-9])"];
* @return The bytes for httpRedirectCode.
*/
public com.google.protobuf.ByteString
getHttpRedirectCodeBytes() {
java.lang.Object ref = httpRedirectCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
httpRedirectCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* HTTP status code of the redirect response.
* Default value: `"301"`.
*
*
* string http_redirect_code = 2 [(.yandex.cloud.pattern) = "3(0[1-9]|[1-9][0-9])"];
* @param value The httpRedirectCode to set.
* @return This builder for chaining.
*/
public Builder setHttpRedirectCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
httpRedirectCode_ = value;
onChanged();
return this;
}
/**
*
* HTTP status code of the redirect response.
* Default value: `"301"`.
*
*
* string http_redirect_code = 2 [(.yandex.cloud.pattern) = "3(0[1-9]|[1-9][0-9])"];
* @return This builder for chaining.
*/
public Builder clearHttpRedirectCode() {
httpRedirectCode_ = getDefaultInstance().getHttpRedirectCode();
onChanged();
return this;
}
/**
*
* HTTP status code of the redirect response.
* Default value: `"301"`.
*
*
* string http_redirect_code = 2 [(.yandex.cloud.pattern) = "3(0[1-9]|[1-9][0-9])"];
* @param value The bytes for httpRedirectCode to set.
* @return This builder for chaining.
*/
public Builder setHttpRedirectCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
httpRedirectCode_ = value;
onChanged();
return this;
}
private int protocol_ = 0;
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 3;
* @return The enum numeric value on the wire for protocol.
*/
@java.lang.Override public int getProtocolValue() {
return protocol_;
}
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 3;
* @param value The enum numeric value on the wire for protocol to set.
* @return This builder for chaining.
*/
public Builder setProtocolValue(int value) {
protocol_ = value;
onChanged();
return this;
}
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 3;
* @return The protocol.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol getProtocol() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol result = yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.valueOf(protocol_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol.UNRECOGNIZED : result;
}
/**
*
* Scheme of the redirect URI.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Protocol protocol = 3;
* @param value The protocol to set.
* @return This builder for chaining.
*/
public Builder setProtocol(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Protocol value) {
if (value == null) {
throw new NullPointerException();
}
protocol_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
*
* string replace_key_prefix_with = 4;
* @return The bytes for replaceKeyPrefixWith.
*/
public com.google.protobuf.ByteString
getReplaceKeyPrefixWithBytes() {
java.lang.Object ref = replaceKeyPrefixWith_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
replaceKeyPrefixWith_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
*
* string replace_key_prefix_with = 4;
* @param value The replaceKeyPrefixWith to set.
* @return This builder for chaining.
*/
public Builder setReplaceKeyPrefixWith(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
replaceKeyPrefixWith_ = value;
onChanged();
return this;
}
/**
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
*
* string replace_key_prefix_with = 4;
* @return This builder for chaining.
*/
public Builder clearReplaceKeyPrefixWith() {
replaceKeyPrefixWith_ = getDefaultInstance().getReplaceKeyPrefixWith();
onChanged();
return this;
}
/**
*
* Substitution for the prefix of the object key specified in [Condition.key_prefix_equals].
* At most one of [replace_key_prefix_with] and [replace_key_with] can be specified.
*
*
* string replace_key_prefix_with = 4;
* @param value The bytes for replaceKeyPrefixWith to set.
* @return This builder for chaining.
*/
public Builder setReplaceKeyPrefixWithBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
replaceKeyPrefixWith_ = value;
onChanged();
return this;
}
private java.lang.Object replaceKeyWith_ = "";
/**
*
* New object key.
* At most one of [replace_key_with] and [replace_key_prefix_with] can be specified.
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Redirect redirect = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Redirect, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Redirect.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RedirectOrBuilder>
getRedirectFieldBuilder() {
if (redirectBuilder_ == null) {
redirectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Redirect, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Redirect.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RedirectOrBuilder>(
getRedirect(),
getParentForChildren(),
isClean());
redirect_ = null;
}
return redirectBuilder_;
}
@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:yandex.cloud.storage.v1.WebsiteSettings.RoutingRule)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.WebsiteSettings.RoutingRule)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RoutingRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RoutingRule();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RoutingRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RoutingRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RoutingRule(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RoutingRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int INDEX_FIELD_NUMBER = 1;
private volatile java.lang.Object index_;
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @return The index.
*/
@java.lang.Override
public java.lang.String getIndex() {
java.lang.Object ref = index_;
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();
index_ = s;
return s;
}
}
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @return The bytes for index.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIndexBytes() {
java.lang.Object ref = index_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
index_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ERROR_FIELD_NUMBER = 2;
private volatile java.lang.Object error_;
/**
*
* Key of the error page object that is returned when an error occurs.
*
* Key of the error page object that is returned when an error occurs.
*
*
* string error = 2;
* @return The bytes for error.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getErrorBytes() {
java.lang.Object ref = error_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
error_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REDIRECT_ALL_REQUESTS_FIELD_NUMBER = 3;
private yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme redirectAllRequests_;
/**
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Scheme redirect_all_requests = 3;
* @return Whether the redirectAllRequests field is set.
*/
@java.lang.Override
public boolean hasRedirectAllRequests() {
return redirectAllRequests_ != null;
}
/**
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Scheme redirect_all_requests = 3;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.SchemeOrBuilder getRedirectAllRequestsOrBuilder() {
return getRedirectAllRequests();
}
public static final int ROUTING_RULES_FIELD_NUMBER = 4;
private java.util.List routingRules_;
/**
*
*
* repeated .yandex.cloud.storage.v1.WebsiteSettings.RoutingRule routing_rules = 4;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.RoutingRuleOrBuilder getRoutingRulesOrBuilder(
int index) {
return routingRules_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, index_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, error_);
}
if (redirectAllRequests_ != null) {
output.writeMessage(3, getRedirectAllRequests());
}
for (int i = 0; i < routingRules_.size(); i++) {
output.writeMessage(4, routingRules_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, index_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, error_);
}
if (redirectAllRequests_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getRedirectAllRequests());
}
for (int i = 0; i < routingRules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, routingRules_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings other = (yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings) obj;
if (!getIndex()
.equals(other.getIndex())) return false;
if (!getError()
.equals(other.getError())) return false;
if (hasRedirectAllRequests() != other.hasRedirectAllRequests()) return false;
if (hasRedirectAllRequests()) {
if (!getRedirectAllRequests()
.equals(other.getRedirectAllRequests())) return false;
}
if (!getRoutingRulesList()
.equals(other.getRoutingRulesList())) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + INDEX_FIELD_NUMBER;
hash = (53 * hash) + getIndex().hashCode();
hash = (37 * hash) + ERROR_FIELD_NUMBER;
hash = (53 * hash) + getError().hashCode();
if (hasRedirectAllRequests()) {
hash = (37 * hash) + REDIRECT_ALL_REQUESTS_FIELD_NUMBER;
hash = (53 * hash) + getRedirectAllRequests().hashCode();
}
if (getRoutingRulesCount() > 0) {
hash = (37 * hash) + ROUTING_RULES_FIELD_NUMBER;
hash = (53 * hash) + getRoutingRulesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings 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 yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings 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 yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings 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(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings 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;
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.WebsiteSettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.WebsiteSettings)
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.class, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getRoutingRulesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
index_ = "";
error_ = "";
if (redirectAllRequestsBuilder_ == null) {
redirectAllRequests_ = null;
} else {
redirectAllRequests_ = null;
redirectAllRequestsBuilder_ = null;
}
if (routingRulesBuilder_ == null) {
routingRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
routingRulesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_WebsiteSettings_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings build() {
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings result = new yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings(this);
int from_bitField0_ = bitField0_;
result.index_ = index_;
result.error_ = error_;
if (redirectAllRequestsBuilder_ == null) {
result.redirectAllRequests_ = redirectAllRequests_;
} else {
result.redirectAllRequests_ = redirectAllRequestsBuilder_.build();
}
if (routingRulesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
routingRules_ = java.util.Collections.unmodifiableList(routingRules_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.routingRules_ = routingRules_;
} else {
result.routingRules_ = routingRulesBuilder_.build();
}
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.getDefaultInstance()) return this;
if (!other.getIndex().isEmpty()) {
index_ = other.index_;
onChanged();
}
if (!other.getError().isEmpty()) {
error_ = other.error_;
onChanged();
}
if (other.hasRedirectAllRequests()) {
mergeRedirectAllRequests(other.getRedirectAllRequests());
}
if (routingRulesBuilder_ == null) {
if (!other.routingRules_.isEmpty()) {
if (routingRules_.isEmpty()) {
routingRules_ = other.routingRules_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRoutingRulesIsMutable();
routingRules_.addAll(other.routingRules_);
}
onChanged();
}
} else {
if (!other.routingRules_.isEmpty()) {
if (routingRulesBuilder_.isEmpty()) {
routingRulesBuilder_.dispose();
routingRulesBuilder_ = null;
routingRules_ = other.routingRules_;
bitField0_ = (bitField0_ & ~0x00000001);
routingRulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRoutingRulesFieldBuilder() : null;
} else {
routingRulesBuilder_.addAllMessages(other.routingRules_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object index_ = "";
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @return The index.
*/
public java.lang.String getIndex() {
java.lang.Object ref = index_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
index_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @return The bytes for index.
*/
public com.google.protobuf.ByteString
getIndexBytes() {
java.lang.Object ref = index_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
index_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @param value The index to set.
* @return This builder for chaining.
*/
public Builder setIndex(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
index_ = value;
onChanged();
return this;
}
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @return This builder for chaining.
*/
public Builder clearIndex() {
index_ = getDefaultInstance().getIndex();
onChanged();
return this;
}
/**
*
* Key of the index page object that is returned when a response is made to the root of the website.
* Either [index] or [redirect_all_requests] must be specified in order for the bucket to host a static website.
* If specified, the index page object must be located in the root of the bucket.
*
*
* string index = 1;
* @param value The bytes for index to set.
* @return This builder for chaining.
*/
public Builder setIndexBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
index_ = value;
onChanged();
return this;
}
private java.lang.Object error_ = "";
/**
*
* Key of the error page object that is returned when an error occurs.
*
* Key of the error page object that is returned when an error occurs.
*
*
* string error = 2;
* @return The bytes for error.
*/
public com.google.protobuf.ByteString
getErrorBytes() {
java.lang.Object ref = error_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
error_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Key of the error page object that is returned when an error occurs.
*
*
* string error = 2;
* @param value The error to set.
* @return This builder for chaining.
*/
public Builder setError(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
error_ = value;
onChanged();
return this;
}
/**
*
* Key of the error page object that is returned when an error occurs.
*
*
* string error = 2;
* @return This builder for chaining.
*/
public Builder clearError() {
error_ = getDefaultInstance().getError();
onChanged();
return this;
}
/**
*
* Key of the error page object that is returned when an error occurs.
*
*
* string error = 2;
* @param value The bytes for error to set.
* @return This builder for chaining.
*/
public Builder setErrorBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
error_ = value;
onChanged();
return this;
}
private yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme redirectAllRequests_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.SchemeOrBuilder> redirectAllRequestsBuilder_;
/**
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Scheme redirect_all_requests = 3;
* @return Whether the redirectAllRequests field is set.
*/
public boolean hasRedirectAllRequests() {
return redirectAllRequestsBuilder_ != null || redirectAllRequests_ != null;
}
/**
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
*
* .yandex.cloud.storage.v1.WebsiteSettings.Scheme redirect_all_requests = 3;
*/
public Builder setRedirectAllRequests(yandex.cloud.api.storage.v1.BucketOuterClass.WebsiteSettings.Scheme value) {
if (redirectAllRequestsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
redirectAllRequests_ = value;
onChanged();
} else {
redirectAllRequestsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Configuration for redirecting all requests sent to the website.
* Either [redirect_all_requests] or [index] must be specified in order for the bucket to host a static website.
* If [redirect_all_requests] is specified, it must be the only field in [Bucket.website_settings].
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.Expiration expiration = 4;
* @return Whether the expiration field is set.
*/
boolean hasExpiration();
/**
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.NoncurrentExpiration noncurrent_expiration = 7;
* @return Whether the noncurrentExpiration field is set.
*/
boolean hasNoncurrentExpiration();
/**
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition}
*/
public static final class NoncurrentTransition extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition)
NoncurrentTransitionOrBuilder {
private static final long serialVersionUID = 0L;
// Use NoncurrentTransition.newBuilder() to construct.
private NoncurrentTransition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NoncurrentTransition() {
storageClass_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new NoncurrentTransition();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NoncurrentTransition(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.Int64Value.Builder subBuilder = null;
if (noncurrentDays_ != null) {
subBuilder = noncurrentDays_.toBuilder();
}
noncurrentDays_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(noncurrentDays_);
noncurrentDays_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
storageClass_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_NoncurrentTransition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_NoncurrentTransition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.class, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.Builder.class);
}
public static final int NONCURRENT_DAYS_FIELD_NUMBER = 1;
private com.google.protobuf.Int64Value noncurrentDays_;
/**
*
* Time period, in number of days since the version of an object was classified as non-current, after which the
* version is transitioned.
*
*
* .google.protobuf.Int64Value noncurrent_days = 1;
* @return Whether the noncurrentDays field is set.
*/
@java.lang.Override
public boolean hasNoncurrentDays() {
return noncurrentDays_ != null;
}
/**
*
* Time period, in number of days since the version of an object was classified as non-current, after which the
* version is transitioned.
*
* Time period, in number of days since the version of an object was classified as non-current, after which the
* version is transitioned.
*
*
* .google.protobuf.Int64Value noncurrent_days = 1;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getNoncurrentDaysOrBuilder() {
return getNoncurrentDays();
}
public static final int STORAGE_CLASS_FIELD_NUMBER = 2;
private volatile java.lang.Object storageClass_;
/**
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 2 [(.yandex.cloud.required) = true];
* @return The bytes for storageClass.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (noncurrentDays_ != null) {
output.writeMessage(1, getNoncurrentDays());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, storageClass_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (noncurrentDays_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getNoncurrentDays());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, storageClass_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition other = (yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition) obj;
if (hasNoncurrentDays() != other.hasNoncurrentDays()) return false;
if (hasNoncurrentDays()) {
if (!getNoncurrentDays()
.equals(other.getNoncurrentDays())) return false;
}
if (!getStorageClass()
.equals(other.getStorageClass())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasNoncurrentDays()) {
hash = (37 * hash) + NONCURRENT_DAYS_FIELD_NUMBER;
hash = (53 * hash) + getNoncurrentDays().hashCode();
}
hash = (37 * hash) + STORAGE_CLASS_FIELD_NUMBER;
hash = (53 * hash) + getStorageClass().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition 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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition 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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition 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(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition 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;
}
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition)
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransitionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_NoncurrentTransition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_NoncurrentTransition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.class, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (noncurrentDaysBuilder_ == null) {
noncurrentDays_ = null;
} else {
noncurrentDays_ = null;
noncurrentDaysBuilder_ = null;
}
storageClass_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_NoncurrentTransition_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition build() {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition result = new yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition(this);
if (noncurrentDaysBuilder_ == null) {
result.noncurrentDays_ = noncurrentDays_;
} else {
result.noncurrentDays_ = noncurrentDaysBuilder_.build();
}
result.storageClass_ = storageClass_;
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.getDefaultInstance()) return this;
if (other.hasNoncurrentDays()) {
mergeNoncurrentDays(other.getNoncurrentDays());
}
if (!other.getStorageClass().isEmpty()) {
storageClass_ = other.storageClass_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Int64Value noncurrentDays_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> noncurrentDaysBuilder_;
/**
*
* Time period, in number of days since the version of an object was classified as non-current, after which the
* version is transitioned.
*
*
* .google.protobuf.Int64Value noncurrent_days = 1;
* @return Whether the noncurrentDays field is set.
*/
public boolean hasNoncurrentDays() {
return noncurrentDaysBuilder_ != null || noncurrentDays_ != null;
}
/**
*
* Time period, in number of days since the version of an object was classified as non-current, after which the
* version is transitioned.
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 2 [(.yandex.cloud.required) = true];
* @return The bytes for storageClass.
*/
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 2 [(.yandex.cloud.required) = true];
* @param value The storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClass(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
storageClass_ = value;
onChanged();
return this;
}
/**
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 2 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearStorageClass() {
storageClass_ = getDefaultInstance().getStorageClass();
onChanged();
return this;
}
/**
*
* Storage class to which a non-current version of an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 2 [(.yandex.cloud.required) = true];
* @param value The bytes for storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClassBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
storageClass_ = 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:yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NoncurrentTransition parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NoncurrentTransition(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TransitionOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.LifecycleRule.Transition)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return Whether the date field is set.
*/
boolean hasDate();
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return The date.
*/
com.google.protobuf.Timestamp getDate();
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return Whether the days field is set.
*/
boolean hasDays();
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return The days.
*/
com.google.protobuf.Int64Value getDays();
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.LifecycleRule.Transition}
*/
public static final class Transition extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.LifecycleRule.Transition)
TransitionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Transition.newBuilder() to construct.
private Transition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Transition() {
storageClass_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Transition();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Transition(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (date_ != null) {
subBuilder = date_.toBuilder();
}
date_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(date_);
date_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.Int64Value.Builder subBuilder = null;
if (days_ != null) {
subBuilder = days_.toBuilder();
}
days_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(days_);
days_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
storageClass_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Transition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Transition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition.class, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition.Builder.class);
}
public static final int DATE_FIELD_NUMBER = 1;
private com.google.protobuf.Timestamp date_;
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return Whether the date field is set.
*/
@java.lang.Override
public boolean hasDate() {
return date_ != null;
}
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return The date.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getDate() {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
}
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getDateOrBuilder() {
return getDate();
}
public static final int DAYS_FIELD_NUMBER = 2;
private com.google.protobuf.Int64Value days_;
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return Whether the days field is set.
*/
@java.lang.Override
public boolean hasDays() {
return days_ != null;
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return The days.
*/
@java.lang.Override
public com.google.protobuf.Int64Value getDays() {
return days_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : days_;
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getDaysOrBuilder() {
return getDays();
}
public static final int STORAGE_CLASS_FIELD_NUMBER = 4;
private volatile java.lang.Object storageClass_;
/**
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 4 [(.yandex.cloud.required) = true];
* @return The bytes for storageClass.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (date_ != null) {
output.writeMessage(1, getDate());
}
if (days_ != null) {
output.writeMessage(2, getDays());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, storageClass_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (date_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getDate());
}
if (days_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getDays());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, storageClass_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition other = (yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition) obj;
if (hasDate() != other.hasDate()) return false;
if (hasDate()) {
if (!getDate()
.equals(other.getDate())) return false;
}
if (hasDays() != other.hasDays()) return false;
if (hasDays()) {
if (!getDays()
.equals(other.getDays())) return false;
}
if (!getStorageClass()
.equals(other.getStorageClass())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasDate()) {
hash = (37 * hash) + DATE_FIELD_NUMBER;
hash = (53 * hash) + getDate().hashCode();
}
if (hasDays()) {
hash = (37 * hash) + DAYS_FIELD_NUMBER;
hash = (53 * hash) + getDays().hashCode();
}
hash = (37 * hash) + STORAGE_CLASS_FIELD_NUMBER;
hash = (53 * hash) + getStorageClass().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition 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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition 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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition 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(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition 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;
}
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.LifecycleRule.Transition}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.LifecycleRule.Transition)
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.TransitionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Transition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Transition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition.class, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (dateBuilder_ == null) {
date_ = null;
} else {
date_ = null;
dateBuilder_ = null;
}
if (daysBuilder_ == null) {
days_ = null;
} else {
days_ = null;
daysBuilder_ = null;
}
storageClass_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Transition_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition build() {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition result = new yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition(this);
if (dateBuilder_ == null) {
result.date_ = date_;
} else {
result.date_ = dateBuilder_.build();
}
if (daysBuilder_ == null) {
result.days_ = days_;
} else {
result.days_ = daysBuilder_.build();
}
result.storageClass_ = storageClass_;
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition.getDefaultInstance()) return this;
if (other.hasDate()) {
mergeDate(other.getDate());
}
if (other.hasDays()) {
mergeDays(other.getDays());
}
if (!other.getStorageClass().isEmpty()) {
storageClass_ = other.storageClass_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Timestamp date_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> dateBuilder_;
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return Whether the date field is set.
*/
public boolean hasDate() {
return dateBuilder_ != null || date_ != null;
}
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return The date.
*/
public com.google.protobuf.Timestamp getDate() {
if (dateBuilder_ == null) {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
} else {
return dateBuilder_.getMessage();
}
}
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
*/
public Builder setDate(com.google.protobuf.Timestamp value) {
if (dateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
date_ = value;
onChanged();
} else {
dateBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
*/
public com.google.protobuf.Timestamp.Builder getDateBuilder() {
onChanged();
return getDateFieldBuilder().getBuilder();
}
/**
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
* Specific date of object transition.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket are
* transitioned immediately.
* At most one of [date] and [days] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return Whether the days field is set.
*/
public boolean hasDays() {
return daysBuilder_ != null || days_ != null;
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return The days.
*/
public com.google.protobuf.Int64Value getDays() {
if (daysBuilder_ == null) {
return days_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : days_;
} else {
return daysBuilder_.getMessage();
}
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
*/
public Builder setDays(com.google.protobuf.Int64Value value) {
if (daysBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
days_ = value;
onChanged();
} else {
daysBuilder_.setMessage(value);
}
return this;
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
*/
public com.google.protobuf.Int64Value.Builder getDaysBuilder() {
onChanged();
return getDaysFieldBuilder().getBuilder();
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object is
* transitioned.
* At most one of [days] and [date] fields can be specified.
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 4 [(.yandex.cloud.required) = true];
* @return The bytes for storageClass.
*/
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 4 [(.yandex.cloud.required) = true];
* @param value The storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClass(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
storageClass_ = value;
onChanged();
return this;
}
/**
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 4 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearStorageClass() {
storageClass_ = getDefaultInstance().getStorageClass();
onChanged();
return this;
}
/**
*
* Storage class to which an object is transitioned from standard storage.
* The only supported class is cold storage (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms). Transitions from cold
* to standard storage and transitions to or from ice storage are not allowed.
*
*
* string storage_class = 4 [(.yandex.cloud.required) = true];
* @param value The bytes for storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClassBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
storageClass_ = 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:yandex.cloud.storage.v1.LifecycleRule.Transition)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.LifecycleRule.Transition)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Transition parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Transition(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExpirationOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.LifecycleRule.Expiration)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return Whether the date field is set.
*/
boolean hasDate();
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return The date.
*/
com.google.protobuf.Timestamp getDate();
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return Whether the days field is set.
*/
boolean hasDays();
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return The days.
*/
com.google.protobuf.Int64Value getDays();
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
*
* .google.protobuf.BoolValue expired_object_delete_marker = 3;
* @return Whether the expiredObjectDeleteMarker field is set.
*/
boolean hasExpiredObjectDeleteMarker();
/**
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
*
* .google.protobuf.BoolValue expired_object_delete_marker = 3;
*/
com.google.protobuf.BoolValueOrBuilder getExpiredObjectDeleteMarkerOrBuilder();
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.LifecycleRule.Expiration}
*/
public static final class Expiration extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.LifecycleRule.Expiration)
ExpirationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Expiration.newBuilder() to construct.
private Expiration(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Expiration() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Expiration();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Expiration(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (date_ != null) {
subBuilder = date_.toBuilder();
}
date_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(date_);
date_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.Int64Value.Builder subBuilder = null;
if (days_ != null) {
subBuilder = days_.toBuilder();
}
days_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(days_);
days_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (expiredObjectDeleteMarker_ != null) {
subBuilder = expiredObjectDeleteMarker_.toBuilder();
}
expiredObjectDeleteMarker_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(expiredObjectDeleteMarker_);
expiredObjectDeleteMarker_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Expiration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Expiration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration.class, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration.Builder.class);
}
public static final int DATE_FIELD_NUMBER = 1;
private com.google.protobuf.Timestamp date_;
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return Whether the date field is set.
*/
@java.lang.Override
public boolean hasDate() {
return date_ != null;
}
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return The date.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getDate() {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
}
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getDateOrBuilder() {
return getDate();
}
public static final int DAYS_FIELD_NUMBER = 2;
private com.google.protobuf.Int64Value days_;
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return Whether the days field is set.
*/
@java.lang.Override
public boolean hasDays() {
return days_ != null;
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return The days.
*/
@java.lang.Override
public com.google.protobuf.Int64Value getDays() {
return days_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : days_;
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getDaysOrBuilder() {
return getDays();
}
public static final int EXPIRED_OBJECT_DELETE_MARKER_FIELD_NUMBER = 3;
private com.google.protobuf.BoolValue expiredObjectDeleteMarker_;
/**
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
*
* .google.protobuf.BoolValue expired_object_delete_marker = 3;
* @return Whether the expiredObjectDeleteMarker field is set.
*/
@java.lang.Override
public boolean hasExpiredObjectDeleteMarker() {
return expiredObjectDeleteMarker_ != null;
}
/**
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
*
* .google.protobuf.BoolValue expired_object_delete_marker = 3;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getExpiredObjectDeleteMarkerOrBuilder() {
return getExpiredObjectDeleteMarker();
}
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 (date_ != null) {
output.writeMessage(1, getDate());
}
if (days_ != null) {
output.writeMessage(2, getDays());
}
if (expiredObjectDeleteMarker_ != null) {
output.writeMessage(3, getExpiredObjectDeleteMarker());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (date_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getDate());
}
if (days_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getDays());
}
if (expiredObjectDeleteMarker_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getExpiredObjectDeleteMarker());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration other = (yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration) obj;
if (hasDate() != other.hasDate()) return false;
if (hasDate()) {
if (!getDate()
.equals(other.getDate())) return false;
}
if (hasDays() != other.hasDays()) return false;
if (hasDays()) {
if (!getDays()
.equals(other.getDays())) return false;
}
if (hasExpiredObjectDeleteMarker() != other.hasExpiredObjectDeleteMarker()) return false;
if (hasExpiredObjectDeleteMarker()) {
if (!getExpiredObjectDeleteMarker()
.equals(other.getExpiredObjectDeleteMarker())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasDate()) {
hash = (37 * hash) + DATE_FIELD_NUMBER;
hash = (53 * hash) + getDate().hashCode();
}
if (hasDays()) {
hash = (37 * hash) + DAYS_FIELD_NUMBER;
hash = (53 * hash) + getDays().hashCode();
}
if (hasExpiredObjectDeleteMarker()) {
hash = (37 * hash) + EXPIRED_OBJECT_DELETE_MARKER_FIELD_NUMBER;
hash = (53 * hash) + getExpiredObjectDeleteMarker().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration 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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration 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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration 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(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration 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;
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.LifecycleRule.Expiration}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.LifecycleRule.Expiration)
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.ExpirationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Expiration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Expiration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration.class, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (dateBuilder_ == null) {
date_ = null;
} else {
date_ = null;
dateBuilder_ = null;
}
if (daysBuilder_ == null) {
days_ = null;
} else {
days_ = null;
daysBuilder_ = null;
}
if (expiredObjectDeleteMarkerBuilder_ == null) {
expiredObjectDeleteMarker_ = null;
} else {
expiredObjectDeleteMarker_ = null;
expiredObjectDeleteMarkerBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_LifecycleRule_Expiration_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration build() {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration result = new yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration(this);
if (dateBuilder_ == null) {
result.date_ = date_;
} else {
result.date_ = dateBuilder_.build();
}
if (daysBuilder_ == null) {
result.days_ = days_;
} else {
result.days_ = daysBuilder_.build();
}
if (expiredObjectDeleteMarkerBuilder_ == null) {
result.expiredObjectDeleteMarker_ = expiredObjectDeleteMarker_;
} else {
result.expiredObjectDeleteMarker_ = expiredObjectDeleteMarkerBuilder_.build();
}
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration.getDefaultInstance()) return this;
if (other.hasDate()) {
mergeDate(other.getDate());
}
if (other.hasDays()) {
mergeDays(other.getDays());
}
if (other.hasExpiredObjectDeleteMarker()) {
mergeExpiredObjectDeleteMarker(other.getExpiredObjectDeleteMarker());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Timestamp date_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> dateBuilder_;
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return Whether the date field is set.
*/
public boolean hasDate() {
return dateBuilder_ != null || date_ != null;
}
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
* @return The date.
*/
public com.google.protobuf.Timestamp getDate() {
if (dateBuilder_ == null) {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
} else {
return dateBuilder_.getMessage();
}
}
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
*/
public Builder setDate(com.google.protobuf.Timestamp value) {
if (dateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
date_ = value;
onChanged();
} else {
dateBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Timestamp date = 1;
*/
public com.google.protobuf.Timestamp.Builder getDateBuilder() {
onChanged();
return getDateFieldBuilder().getBuilder();
}
/**
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
* Specific date of object expiration.
* The rule continues to apply even after the date has passed, i.e. any new objects created in the bucket expire
* immediately.
* Exactly one of [date], [days], and [expired_object_delete_marker] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return Whether the days field is set.
*/
public boolean hasDays() {
return daysBuilder_ != null || days_ != null;
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
* @return The days.
*/
public com.google.protobuf.Int64Value getDays() {
if (daysBuilder_ == null) {
return days_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : days_;
} else {
return daysBuilder_.getMessage();
}
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
*/
public Builder setDays(com.google.protobuf.Int64Value value) {
if (daysBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
days_ = value;
onChanged();
} else {
daysBuilder_.setMessage(value);
}
return this;
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
*
* .google.protobuf.Int64Value days = 2;
*/
public com.google.protobuf.Int64Value.Builder getDaysBuilder() {
onChanged();
return getDaysFieldBuilder().getBuilder();
}
/**
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
* Time period, in number of days from the creation or modification of the object, after which an object expires.
* Exactly one of [days], [date], and [expired_object_delete_marker] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
*
* .google.protobuf.BoolValue expired_object_delete_marker = 3;
* @return Whether the expiredObjectDeleteMarker field is set.
*/
public boolean hasExpiredObjectDeleteMarker() {
return expiredObjectDeleteMarkerBuilder_ != null || expiredObjectDeleteMarker_ != null;
}
/**
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
*
* .google.protobuf.BoolValue expired_object_delete_marker = 3;
*/
public Builder setExpiredObjectDeleteMarker(com.google.protobuf.BoolValue value) {
if (expiredObjectDeleteMarkerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expiredObjectDeleteMarker_ = value;
onChanged();
} else {
expiredObjectDeleteMarkerBuilder_.setMessage(value);
}
return this;
}
/**
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
* Indicates whether a delete marker of an object with no non-current versions (referred to as an expired object
* delete marker) is removed at the object's expiration.
* Exactly one of [expired_object_delete_marker], [date], and [days] fields can be specified.
*
*
* .google.protobuf.BoolValue expired_object_delete_marker = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getExpiredObjectDeleteMarkerFieldBuilder() {
if (expiredObjectDeleteMarkerBuilder_ == null) {
expiredObjectDeleteMarkerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getExpiredObjectDeleteMarker(),
getParentForChildren(),
isClean());
expiredObjectDeleteMarker_ = null;
}
return expiredObjectDeleteMarkerBuilder_;
}
@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:yandex.cloud.storage.v1.LifecycleRule.Expiration)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.LifecycleRule.Expiration)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Expiration parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Expiration(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RuleFilterOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.LifecycleRule.RuleFilter)
com.google.protobuf.MessageOrBuilder {
/**
*
* Key prefix that the object must have in order for the rule to apply.
*
*
* .google.protobuf.Int64Value object_size_less_than = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>
getObjectSizeLessThanFieldBuilder() {
if (objectSizeLessThanBuilder_ == null) {
objectSizeLessThanBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>(
getObjectSizeLessThan(),
getParentForChildren(),
isClean());
objectSizeLessThan_ = null;
}
return objectSizeLessThanBuilder_;
}
@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:yandex.cloud.storage.v1.LifecycleRule.RuleFilter)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.LifecycleRule.RuleFilter)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.RuleFilter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.RuleFilter();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.RuleFilter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RuleFilter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RuleFilter(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.RuleFilter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ID_FIELD_NUMBER = 1;
private com.google.protobuf.StringValue id_;
/**
*
* ID of the rule. Provided by the client or generated at creation time.
*
*
* .google.protobuf.StringValue id = 1;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return id_ != null;
}
/**
*
* ID of the rule. Provided by the client or generated at creation time.
*
*
* .google.protobuf.StringValue id = 1;
* @return The id.
*/
@java.lang.Override
public com.google.protobuf.StringValue getId() {
return id_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : id_;
}
/**
*
* ID of the rule. Provided by the client or generated at creation time.
*
*
* .google.protobuf.StringValue id = 1;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getIdOrBuilder() {
return getId();
}
public static final int ENABLED_FIELD_NUMBER = 2;
private boolean enabled_;
/**
*
* Indicates whether the rule is in effect.
*
*
* bool enabled = 2;
* @return The enabled.
*/
@java.lang.Override
public boolean getEnabled() {
return enabled_;
}
public static final int FILTER_FIELD_NUMBER = 3;
private yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.RuleFilter filter_;
/**
*
* Filter that identifies the objects to which the rule applies.
* If not specified, the rule applies to all objects in the bucket.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.RuleFilter filter = 3;
* @return Whether the filter field is set.
*/
@java.lang.Override
public boolean hasFilter() {
return filter_ != null;
}
/**
*
* Filter that identifies the objects to which the rule applies.
* If not specified, the rule applies to all objects in the bucket.
*
* Filter that identifies the objects to which the rule applies.
* If not specified, the rule applies to all objects in the bucket.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.RuleFilter filter = 3;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.RuleFilterOrBuilder getFilterOrBuilder() {
return getFilter();
}
public static final int EXPIRATION_FIELD_NUMBER = 4;
private yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration expiration_;
/**
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.Expiration expiration = 4;
* @return Whether the expiration field is set.
*/
@java.lang.Override
public boolean hasExpiration() {
return expiration_ != null;
}
/**
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.Expiration expiration = 4;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.ExpirationOrBuilder getExpirationOrBuilder() {
return getExpiration();
}
public static final int TRANSITIONS_FIELD_NUMBER = 5;
private java.util.List transitions_;
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.Transition transitions = 5;
*/
@java.lang.Override
public int getTransitionsCount() {
return transitions_.size();
}
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.Transition transitions = 5;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.TransitionOrBuilder getTransitionsOrBuilder(
int index) {
return transitions_.get(index);
}
public static final int ABORT_INCOMPLETE_MULTIPART_UPLOAD_FIELD_NUMBER = 6;
private yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.AfterDays abortIncompleteMultipartUpload_;
/**
*
* Configuration for aborting incomplete [multipart uploads](/docs/storage/concepts/multipart).
*
*
* .yandex.cloud.storage.v1.LifecycleRule.AfterDays abort_incomplete_multipart_upload = 6;
* @return Whether the abortIncompleteMultipartUpload field is set.
*/
@java.lang.Override
public boolean hasAbortIncompleteMultipartUpload() {
return abortIncompleteMultipartUpload_ != null;
}
/**
*
* Configuration for aborting incomplete [multipart uploads](/docs/storage/concepts/multipart).
*
* Configuration for aborting incomplete [multipart uploads](/docs/storage/concepts/multipart).
*
*
* .yandex.cloud.storage.v1.LifecycleRule.AfterDays abort_incomplete_multipart_upload = 6;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.AfterDaysOrBuilder getAbortIncompleteMultipartUploadOrBuilder() {
return getAbortIncompleteMultipartUpload();
}
public static final int NONCURRENT_EXPIRATION_FIELD_NUMBER = 7;
private yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentExpiration noncurrentExpiration_;
/**
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.NoncurrentExpiration noncurrent_expiration = 7;
* @return Whether the noncurrentExpiration field is set.
*/
@java.lang.Override
public boolean hasNoncurrentExpiration() {
return noncurrentExpiration_ != null;
}
/**
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.NoncurrentExpiration noncurrent_expiration = 7;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentExpirationOrBuilder getNoncurrentExpirationOrBuilder() {
return getNoncurrentExpiration();
}
public static final int NONCURRENT_TRANSITIONS_FIELD_NUMBER = 8;
private java.util.List noncurrentTransitions_;
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
@java.lang.Override
public int getNoncurrentTransitionsCount() {
return noncurrentTransitions_.size();
}
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransitionOrBuilder getNoncurrentTransitionsOrBuilder(
int index) {
return noncurrentTransitions_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (id_ != null) {
output.writeMessage(1, getId());
}
if (enabled_ != false) {
output.writeBool(2, enabled_);
}
if (filter_ != null) {
output.writeMessage(3, getFilter());
}
if (expiration_ != null) {
output.writeMessage(4, getExpiration());
}
for (int i = 0; i < transitions_.size(); i++) {
output.writeMessage(5, transitions_.get(i));
}
if (abortIncompleteMultipartUpload_ != null) {
output.writeMessage(6, getAbortIncompleteMultipartUpload());
}
if (noncurrentExpiration_ != null) {
output.writeMessage(7, getNoncurrentExpiration());
}
for (int i = 0; i < noncurrentTransitions_.size(); i++) {
output.writeMessage(8, noncurrentTransitions_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getId());
}
if (enabled_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, enabled_);
}
if (filter_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getFilter());
}
if (expiration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getExpiration());
}
for (int i = 0; i < transitions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, transitions_.get(i));
}
if (abortIncompleteMultipartUpload_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getAbortIncompleteMultipartUpload());
}
if (noncurrentExpiration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getNoncurrentExpiration());
}
for (int i = 0; i < noncurrentTransitions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, noncurrentTransitions_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule other = (yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule) obj;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (!getId()
.equals(other.getId())) return false;
}
if (getEnabled()
!= other.getEnabled()) return false;
if (hasFilter() != other.hasFilter()) return false;
if (hasFilter()) {
if (!getFilter()
.equals(other.getFilter())) return false;
}
if (hasExpiration() != other.hasExpiration()) return false;
if (hasExpiration()) {
if (!getExpiration()
.equals(other.getExpiration())) return false;
}
if (!getTransitionsList()
.equals(other.getTransitionsList())) return false;
if (hasAbortIncompleteMultipartUpload() != other.hasAbortIncompleteMultipartUpload()) return false;
if (hasAbortIncompleteMultipartUpload()) {
if (!getAbortIncompleteMultipartUpload()
.equals(other.getAbortIncompleteMultipartUpload())) return false;
}
if (hasNoncurrentExpiration() != other.hasNoncurrentExpiration()) return false;
if (hasNoncurrentExpiration()) {
if (!getNoncurrentExpiration()
.equals(other.getNoncurrentExpiration())) return false;
}
if (!getNoncurrentTransitionsList()
.equals(other.getNoncurrentTransitionsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
}
hash = (37 * hash) + ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnabled());
if (hasFilter()) {
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
}
if (hasExpiration()) {
hash = (37 * hash) + EXPIRATION_FIELD_NUMBER;
hash = (53 * hash) + getExpiration().hashCode();
}
if (getTransitionsCount() > 0) {
hash = (37 * hash) + TRANSITIONS_FIELD_NUMBER;
hash = (53 * hash) + getTransitionsList().hashCode();
}
if (hasAbortIncompleteMultipartUpload()) {
hash = (37 * hash) + ABORT_INCOMPLETE_MULTIPART_UPLOAD_FIELD_NUMBER;
hash = (53 * hash) + getAbortIncompleteMultipartUpload().hashCode();
}
if (hasNoncurrentExpiration()) {
hash = (37 * hash) + NONCURRENT_EXPIRATION_FIELD_NUMBER;
hash = (53 * hash) + getNoncurrentExpiration().hashCode();
}
if (getNoncurrentTransitionsCount() > 0) {
hash = (37 * hash) + NONCURRENT_TRANSITIONS_FIELD_NUMBER;
hash = (53 * hash) + getNoncurrentTransitionsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule 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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule 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 yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule 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(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule 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 object lifecycle rule resource for the bucket.
* For details about the concept, see [documentation](/docs/storage/concepts/lifecycles).
*
* ID of the rule. Provided by the client or generated at creation time.
*
*
* .google.protobuf.StringValue id = 1;
* @return Whether the id field is set.
*/
public boolean hasId() {
return idBuilder_ != null || id_ != null;
}
/**
*
* ID of the rule. Provided by the client or generated at creation time.
*
*
* .google.protobuf.StringValue id = 1;
* @return The id.
*/
public com.google.protobuf.StringValue getId() {
if (idBuilder_ == null) {
return id_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : id_;
} else {
return idBuilder_.getMessage();
}
}
/**
*
* ID of the rule. Provided by the client or generated at creation time.
*
*
* .google.protobuf.StringValue id = 1;
*/
public Builder setId(com.google.protobuf.StringValue value) {
if (idBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
} else {
idBuilder_.setMessage(value);
}
return this;
}
/**
*
* ID of the rule. Provided by the client or generated at creation time.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.Expiration expiration = 4;
* @return Whether the expiration field is set.
*/
public boolean hasExpiration() {
return expirationBuilder_ != null || expiration_ != null;
}
/**
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.Expiration expiration = 4;
*/
public Builder setExpiration(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Expiration value) {
if (expirationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expiration_ = value;
onChanged();
} else {
expirationBuilder_.setMessage(value);
}
return this;
}
/**
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* Expiration rule.
* The expiration of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is deleted and cannot be
* recovered.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`), the current version of the
* object (if it exists and is not a delete marker) is retained as a non-current version, and a delete marker becomes
* the current version of the object.
* For the bucket with versioning suspended ([Bucket.versioning] is `VERSIONING_SUSPENDED`), the current version of
* the object is retained as a non-current version if it is not a delete marker, or is removed otherwise, and a
* delete marker becomes the current version of the object.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.Transition transitions = 5;
*/
public int getTransitionsCount() {
if (transitionsBuilder_ == null) {
return transitions_.size();
} else {
return transitionsBuilder_.getCount();
}
}
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.Transition transitions = 5;
*/
public Builder setTransitions(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition value) {
if (transitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTransitionsIsMutable();
transitions_.set(index, value);
onChanged();
} else {
transitionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.Transition transitions = 5;
*/
public Builder addTransitions(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition value) {
if (transitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTransitionsIsMutable();
transitions_.add(value);
onChanged();
} else {
transitionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.Transition transitions = 5;
*/
public Builder addTransitions(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition value) {
if (transitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTransitionsIsMutable();
transitions_.add(index, value);
onChanged();
} else {
transitionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.Transition transitions = 5;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.Transition.Builder getTransitionsBuilder(
int index) {
return getTransitionsFieldBuilder().getBuilder(index);
}
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.Transition transitions = 5;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.TransitionOrBuilder getTransitionsOrBuilder(
int index) {
if (transitionsBuilder_ == null) {
return transitions_.get(index); } else {
return transitionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* List of transition rules.
* The transition of an object is described as follows.
* For the unversioned bucket ([Bucket.versioning] is `VERSIONING_DISABLED`), the object is transitioned to the
* specified storage class.
* For the bucket with versioning enabled ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended
* (`VERSIONING_SUSPENDED`), the current version of the object is transitioned to the specified storage class.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.NoncurrentExpiration noncurrent_expiration = 7;
* @return Whether the noncurrentExpiration field is set.
*/
public boolean hasNoncurrentExpiration() {
return noncurrentExpirationBuilder_ != null || noncurrentExpiration_ != null;
}
/**
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
*
* .yandex.cloud.storage.v1.LifecycleRule.NoncurrentExpiration noncurrent_expiration = 7;
*/
public Builder setNoncurrentExpiration(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentExpiration value) {
if (noncurrentExpirationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
noncurrentExpiration_ = value;
onChanged();
} else {
noncurrentExpirationBuilder_.setMessage(value);
}
return this;
}
/**
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* Expiration rule for non-current versions of objects in a bucket with versioning enabled ([Bucket.versioning] is
* `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At expiration, the non-current version of the object is deleted and cannot be recovered.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
public int getNoncurrentTransitionsCount() {
if (noncurrentTransitionsBuilder_ == null) {
return noncurrentTransitions_.size();
} else {
return noncurrentTransitionsBuilder_.getCount();
}
}
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
public Builder setNoncurrentTransitions(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition value) {
if (noncurrentTransitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNoncurrentTransitionsIsMutable();
noncurrentTransitions_.set(index, value);
onChanged();
} else {
noncurrentTransitionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
public Builder addNoncurrentTransitions(yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition value) {
if (noncurrentTransitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNoncurrentTransitionsIsMutable();
noncurrentTransitions_.add(value);
onChanged();
} else {
noncurrentTransitionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
public Builder addNoncurrentTransitions(
int index, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition value) {
if (noncurrentTransitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNoncurrentTransitionsIsMutable();
noncurrentTransitions_.add(index, value);
onChanged();
} else {
noncurrentTransitionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.Builder getNoncurrentTransitionsBuilder(
int index) {
return getNoncurrentTransitionsFieldBuilder().getBuilder(index);
}
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransitionOrBuilder getNoncurrentTransitionsOrBuilder(
int index) {
if (noncurrentTransitionsBuilder_ == null) {
return noncurrentTransitions_.get(index); } else {
return noncurrentTransitionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
* List of transition rules for non-current versions of objects in a bucket with versioning enabled
* ([Bucket.versioning] is `VERSIONING_ENABLED`) or suspended (`VERSIONING_SUSPENDED`).
* At transition, the non-current version of the object is transitioned to the specified storage class.
*
*
* repeated .yandex.cloud.storage.v1.LifecycleRule.NoncurrentTransition noncurrent_transitions = 8;
*/
public java.util.List
getNoncurrentTransitionsBuilderList() {
return getNoncurrentTransitionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransitionOrBuilder>
getNoncurrentTransitionsFieldBuilder() {
if (noncurrentTransitionsBuilder_ == null) {
noncurrentTransitionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransition.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule.NoncurrentTransitionOrBuilder>(
noncurrentTransitions_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
noncurrentTransitions_ = null;
}
return noncurrentTransitionsBuilder_;
}
@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:yandex.cloud.storage.v1.LifecycleRule)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.LifecycleRule)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LifecycleRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LifecycleRule(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.LifecycleRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CountersOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.Counters)
com.google.protobuf.MessageOrBuilder {
/**
*
* Total size of objects uploaded in single operation, in bytes.
*
*
* int64 simple_object_size = 1;
* @return The simpleObjectSize.
*/
long getSimpleObjectSize();
/**
*
* Number of objects uploaded in single operation.
*
*
* int64 simple_object_count = 2;
* @return The simpleObjectCount.
*/
long getSimpleObjectCount();
/**
*
* Total size of uploaded parts in incomplete multipart uploads, in bytes.
*
*
* int64 objects_parts_size = 3;
* @return The objectsPartsSize.
*/
long getObjectsPartsSize();
/**
*
* Number of uploaded parts in incomplete multipart uploads.
*
*
* int64 objects_parts_count = 4;
* @return The objectsPartsCount.
*/
long getObjectsPartsCount();
/**
*
* Total size of objects uploaded in multiple parts, in bytes.
*
*
* int64 multipart_objects_size = 5;
* @return The multipartObjectsSize.
*/
long getMultipartObjectsSize();
/**
*
* Number of objects uploaded in multiple parts.
*
*
* int64 multipart_objects_count = 6;
* @return The multipartObjectsCount.
*/
long getMultipartObjectsCount();
/**
*
* Number of incomplete multipart uploads.
*
*
* int64 active_multipart_count = 7;
* @return The activeMultipartCount.
*/
long getActiveMultipartCount();
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.Counters}
*/
public static final class Counters extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.Counters)
CountersOrBuilder {
private static final long serialVersionUID = 0L;
// Use Counters.newBuilder() to construct.
private Counters(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Counters() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Counters();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Counters(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
simpleObjectSize_ = input.readInt64();
break;
}
case 16: {
simpleObjectCount_ = input.readInt64();
break;
}
case 24: {
objectsPartsSize_ = input.readInt64();
break;
}
case 32: {
objectsPartsCount_ = input.readInt64();
break;
}
case 40: {
multipartObjectsSize_ = input.readInt64();
break;
}
case 48: {
multipartObjectsCount_ = input.readInt64();
break;
}
case 56: {
activeMultipartCount_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Counters_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Counters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.Counters.class, yandex.cloud.api.storage.v1.BucketOuterClass.Counters.Builder.class);
}
public static final int SIMPLE_OBJECT_SIZE_FIELD_NUMBER = 1;
private long simpleObjectSize_;
/**
*
* Total size of objects uploaded in single operation, in bytes.
*
*
* int64 simple_object_size = 1;
* @return The simpleObjectSize.
*/
@java.lang.Override
public long getSimpleObjectSize() {
return simpleObjectSize_;
}
public static final int SIMPLE_OBJECT_COUNT_FIELD_NUMBER = 2;
private long simpleObjectCount_;
/**
*
* Number of objects uploaded in single operation.
*
*
* int64 simple_object_count = 2;
* @return The simpleObjectCount.
*/
@java.lang.Override
public long getSimpleObjectCount() {
return simpleObjectCount_;
}
public static final int OBJECTS_PARTS_SIZE_FIELD_NUMBER = 3;
private long objectsPartsSize_;
/**
*
* Total size of uploaded parts in incomplete multipart uploads, in bytes.
*
*
* int64 objects_parts_size = 3;
* @return The objectsPartsSize.
*/
@java.lang.Override
public long getObjectsPartsSize() {
return objectsPartsSize_;
}
public static final int OBJECTS_PARTS_COUNT_FIELD_NUMBER = 4;
private long objectsPartsCount_;
/**
*
* Number of uploaded parts in incomplete multipart uploads.
*
*
* int64 objects_parts_count = 4;
* @return The objectsPartsCount.
*/
@java.lang.Override
public long getObjectsPartsCount() {
return objectsPartsCount_;
}
public static final int MULTIPART_OBJECTS_SIZE_FIELD_NUMBER = 5;
private long multipartObjectsSize_;
/**
*
* Total size of objects uploaded in multiple parts, in bytes.
*
*
* int64 multipart_objects_size = 5;
* @return The multipartObjectsSize.
*/
@java.lang.Override
public long getMultipartObjectsSize() {
return multipartObjectsSize_;
}
public static final int MULTIPART_OBJECTS_COUNT_FIELD_NUMBER = 6;
private long multipartObjectsCount_;
/**
*
* Number of objects uploaded in multiple parts.
*
*
* int64 multipart_objects_count = 6;
* @return The multipartObjectsCount.
*/
@java.lang.Override
public long getMultipartObjectsCount() {
return multipartObjectsCount_;
}
public static final int ACTIVE_MULTIPART_COUNT_FIELD_NUMBER = 7;
private long activeMultipartCount_;
/**
*
* Total size of objects uploaded in single operation, in bytes.
*
*
* int64 simple_object_size = 1;
* @return The simpleObjectSize.
*/
@java.lang.Override
public long getSimpleObjectSize() {
return simpleObjectSize_;
}
/**
*
* Total size of objects uploaded in single operation, in bytes.
*
*
* int64 simple_object_size = 1;
* @param value The simpleObjectSize to set.
* @return This builder for chaining.
*/
public Builder setSimpleObjectSize(long value) {
simpleObjectSize_ = value;
onChanged();
return this;
}
/**
*
* Total size of objects uploaded in single operation, in bytes.
*
*
* int64 simple_object_size = 1;
* @return This builder for chaining.
*/
public Builder clearSimpleObjectSize() {
simpleObjectSize_ = 0L;
onChanged();
return this;
}
private long simpleObjectCount_ ;
/**
*
* Number of objects uploaded in single operation.
*
*
* int64 simple_object_count = 2;
* @return The simpleObjectCount.
*/
@java.lang.Override
public long getSimpleObjectCount() {
return simpleObjectCount_;
}
/**
*
* Number of objects uploaded in single operation.
*
*
* int64 simple_object_count = 2;
* @param value The simpleObjectCount to set.
* @return This builder for chaining.
*/
public Builder setSimpleObjectCount(long value) {
simpleObjectCount_ = value;
onChanged();
return this;
}
/**
*
* Number of objects uploaded in single operation.
*
*
* int64 simple_object_count = 2;
* @return This builder for chaining.
*/
public Builder clearSimpleObjectCount() {
simpleObjectCount_ = 0L;
onChanged();
return this;
}
private long objectsPartsSize_ ;
/**
*
* Total size of uploaded parts in incomplete multipart uploads, in bytes.
*
*
* int64 objects_parts_size = 3;
* @return The objectsPartsSize.
*/
@java.lang.Override
public long getObjectsPartsSize() {
return objectsPartsSize_;
}
/**
*
* Total size of uploaded parts in incomplete multipart uploads, in bytes.
*
*
* int64 objects_parts_size = 3;
* @param value The objectsPartsSize to set.
* @return This builder for chaining.
*/
public Builder setObjectsPartsSize(long value) {
objectsPartsSize_ = value;
onChanged();
return this;
}
/**
*
* Total size of uploaded parts in incomplete multipart uploads, in bytes.
*
*
* int64 objects_parts_size = 3;
* @return This builder for chaining.
*/
public Builder clearObjectsPartsSize() {
objectsPartsSize_ = 0L;
onChanged();
return this;
}
private long objectsPartsCount_ ;
/**
*
* Number of uploaded parts in incomplete multipart uploads.
*
*
* int64 objects_parts_count = 4;
* @return The objectsPartsCount.
*/
@java.lang.Override
public long getObjectsPartsCount() {
return objectsPartsCount_;
}
/**
*
* Number of uploaded parts in incomplete multipart uploads.
*
*
* int64 objects_parts_count = 4;
* @param value The objectsPartsCount to set.
* @return This builder for chaining.
*/
public Builder setObjectsPartsCount(long value) {
objectsPartsCount_ = value;
onChanged();
return this;
}
/**
*
* Number of uploaded parts in incomplete multipart uploads.
*
*
* int64 objects_parts_count = 4;
* @return This builder for chaining.
*/
public Builder clearObjectsPartsCount() {
objectsPartsCount_ = 0L;
onChanged();
return this;
}
private long multipartObjectsSize_ ;
/**
*
* Total size of objects uploaded in multiple parts, in bytes.
*
*
* int64 multipart_objects_size = 5;
* @return The multipartObjectsSize.
*/
@java.lang.Override
public long getMultipartObjectsSize() {
return multipartObjectsSize_;
}
/**
*
* Total size of objects uploaded in multiple parts, in bytes.
*
*
* int64 multipart_objects_size = 5;
* @param value The multipartObjectsSize to set.
* @return This builder for chaining.
*/
public Builder setMultipartObjectsSize(long value) {
multipartObjectsSize_ = value;
onChanged();
return this;
}
/**
*
* Total size of objects uploaded in multiple parts, in bytes.
*
*
* int64 multipart_objects_size = 5;
* @return This builder for chaining.
*/
public Builder clearMultipartObjectsSize() {
multipartObjectsSize_ = 0L;
onChanged();
return this;
}
private long multipartObjectsCount_ ;
/**
*
* Number of objects uploaded in multiple parts.
*
*
* int64 multipart_objects_count = 6;
* @return The multipartObjectsCount.
*/
@java.lang.Override
public long getMultipartObjectsCount() {
return multipartObjectsCount_;
}
/**
*
* Number of objects uploaded in multiple parts.
*
*
* int64 multipart_objects_count = 6;
* @param value The multipartObjectsCount to set.
* @return This builder for chaining.
*/
public Builder setMultipartObjectsCount(long value) {
multipartObjectsCount_ = value;
onChanged();
return this;
}
/**
*
* Number of objects uploaded in multiple parts.
*
*
* int64 multipart_objects_count = 6;
* @return This builder for chaining.
*/
public Builder clearMultipartObjectsCount() {
multipartObjectsCount_ = 0L;
onChanged();
return this;
}
private long activeMultipartCount_ ;
/**
*
* Number of incomplete multipart uploads.
*
*
* int64 active_multipart_count = 7;
* @return The activeMultipartCount.
*/
@java.lang.Override
public long getActiveMultipartCount() {
return activeMultipartCount_;
}
/**
*
* Number of incomplete multipart uploads.
*
*
* int64 active_multipart_count = 7;
* @param value The activeMultipartCount to set.
* @return This builder for chaining.
*/
public Builder setActiveMultipartCount(long value) {
activeMultipartCount_ = value;
onChanged();
return this;
}
/**
*
* Number of incomplete multipart uploads.
*
*
* int64 active_multipart_count = 7;
* @return This builder for chaining.
*/
public Builder clearActiveMultipartCount() {
activeMultipartCount_ = 0L;
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:yandex.cloud.storage.v1.Counters)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.Counters)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.Counters DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.Counters();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Counters getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Counters parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Counters(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.Counters getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OptionalSizeByClassOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.OptionalSizeByClass)
com.google.protobuf.MessageOrBuilder {
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
com.google.protobuf.ByteString
getStorageClassBytes();
/**
*
* Size of available space in the bucket for the storage class.
*
*
* .google.protobuf.Int64Value class_size = 2;
* @return Whether the classSize field is set.
*/
boolean hasClassSize();
/**
*
* Size of available space in the bucket for the storage class.
*
* A resource for size of available space in a bucket for a storage class.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.OptionalSizeByClass}
*/
public static final class OptionalSizeByClass extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.OptionalSizeByClass)
OptionalSizeByClassOrBuilder {
private static final long serialVersionUID = 0L;
// Use OptionalSizeByClass.newBuilder() to construct.
private OptionalSizeByClass(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OptionalSizeByClass() {
storageClass_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new OptionalSizeByClass();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OptionalSizeByClass(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
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();
storageClass_ = s;
break;
}
case 18: {
com.google.protobuf.Int64Value.Builder subBuilder = null;
if (classSize_ != null) {
subBuilder = classSize_.toBuilder();
}
classSize_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(classSize_);
classSize_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_OptionalSizeByClass_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_OptionalSizeByClass_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass.class, yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass.Builder.class);
}
public static final int STORAGE_CLASS_FIELD_NUMBER = 1;
private volatile java.lang.Object storageClass_;
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLASS_SIZE_FIELD_NUMBER = 2;
private com.google.protobuf.Int64Value classSize_;
/**
*
* Size of available space in the bucket for the storage class.
*
*
* .google.protobuf.Int64Value class_size = 2;
* @return Whether the classSize field is set.
*/
@java.lang.Override
public boolean hasClassSize() {
return classSize_ != null;
}
/**
*
* Size of available space in the bucket for the storage class.
*
* Size of available space in the bucket for the storage class.
*
*
* .google.protobuf.Int64Value class_size = 2;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getClassSizeOrBuilder() {
return getClassSize();
}
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(storageClass_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, storageClass_);
}
if (classSize_ != null) {
output.writeMessage(2, getClassSize());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, storageClass_);
}
if (classSize_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getClassSize());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass other = (yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass) obj;
if (!getStorageClass()
.equals(other.getStorageClass())) return false;
if (hasClassSize() != other.hasClassSize()) return false;
if (hasClassSize()) {
if (!getClassSize()
.equals(other.getClassSize())) return false;
}
if (!unknownFields.equals(other.unknownFields)) 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) + STORAGE_CLASS_FIELD_NUMBER;
hash = (53 * hash) + getStorageClass().hashCode();
if (hasClassSize()) {
hash = (37 * hash) + CLASS_SIZE_FIELD_NUMBER;
hash = (53 * hash) + getClassSize().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass 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 yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass 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 yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass 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(yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass 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;
}
/**
*
* A resource for size of available space in a bucket for a storage class.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.OptionalSizeByClass}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.OptionalSizeByClass)
yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClassOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_OptionalSizeByClass_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_OptionalSizeByClass_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass.class, yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
storageClass_ = "";
if (classSizeBuilder_ == null) {
classSize_ = null;
} else {
classSize_ = null;
classSizeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_OptionalSizeByClass_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass build() {
yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass result = new yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass(this);
result.storageClass_ = storageClass_;
if (classSizeBuilder_ == null) {
result.classSize_ = classSize_;
} else {
result.classSize_ = classSizeBuilder_.build();
}
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass.getDefaultInstance()) return this;
if (!other.getStorageClass().isEmpty()) {
storageClass_ = other.storageClass_;
onChanged();
}
if (other.hasClassSize()) {
mergeClassSize(other.getClassSize());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object storageClass_ = "";
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @param value The storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClass(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
storageClass_ = value;
onChanged();
return this;
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return This builder for chaining.
*/
public Builder clearStorageClass() {
storageClass_ = getDefaultInstance().getStorageClass();
onChanged();
return this;
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @param value The bytes for storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClassBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
storageClass_ = value;
onChanged();
return this;
}
private com.google.protobuf.Int64Value classSize_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> classSizeBuilder_;
/**
*
* Size of available space in the bucket for the storage class.
*
*
* .google.protobuf.Int64Value class_size = 2;
* @return Whether the classSize field is set.
*/
public boolean hasClassSize() {
return classSizeBuilder_ != null || classSize_ != null;
}
/**
*
* Size of available space in the bucket for the storage class.
*
* Size of available space in the bucket for the storage class.
*
*
* .google.protobuf.Int64Value class_size = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>
getClassSizeFieldBuilder() {
if (classSizeBuilder_ == null) {
classSizeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>(
getClassSize(),
getParentForChildren(),
isClean());
classSize_ = null;
}
return classSizeBuilder_;
}
@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:yandex.cloud.storage.v1.OptionalSizeByClass)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.OptionalSizeByClass)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OptionalSizeByClass parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OptionalSizeByClass(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.OptionalSizeByClass getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SizeByClassOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.SizeByClass)
com.google.protobuf.MessageOrBuilder {
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
com.google.protobuf.ByteString
getStorageClassBytes();
/**
*
* Size of used space in the bucket for the storage class.
*
*
* int64 class_size = 2;
* @return The classSize.
*/
long getClassSize();
}
/**
*
* A resource for size of used space in a bucket for a storage class.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.SizeByClass}
*/
public static final class SizeByClass extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.SizeByClass)
SizeByClassOrBuilder {
private static final long serialVersionUID = 0L;
// Use SizeByClass.newBuilder() to construct.
private SizeByClass(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SizeByClass() {
storageClass_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SizeByClass();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SizeByClass(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
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();
storageClass_ = s;
break;
}
case 16: {
classSize_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_SizeByClass_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_SizeByClass_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass.class, yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass.Builder.class);
}
public static final int STORAGE_CLASS_FIELD_NUMBER = 1;
private volatile java.lang.Object storageClass_;
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLASS_SIZE_FIELD_NUMBER = 2;
private long classSize_;
/**
*
* Size of used space in the bucket for the storage class.
*
*
* int64 class_size = 2;
* @return The classSize.
*/
@java.lang.Override
public long getClassSize() {
return classSize_;
}
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(storageClass_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, storageClass_);
}
if (classSize_ != 0L) {
output.writeInt64(2, classSize_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, storageClass_);
}
if (classSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, classSize_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass other = (yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass) obj;
if (!getStorageClass()
.equals(other.getStorageClass())) return false;
if (getClassSize()
!= other.getClassSize()) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + STORAGE_CLASS_FIELD_NUMBER;
hash = (53 * hash) + getStorageClass().hashCode();
hash = (37 * hash) + CLASS_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getClassSize());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass 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 yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass 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 yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass 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(yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass 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;
}
/**
*
* A resource for size of used space in a bucket for a storage class.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.SizeByClass}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.SizeByClass)
yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClassOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_SizeByClass_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_SizeByClass_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass.class, yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
storageClass_ = "";
classSize_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_SizeByClass_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass build() {
yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass result = new yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass(this);
result.storageClass_ = storageClass_;
result.classSize_ = classSize_;
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass.getDefaultInstance()) return this;
if (!other.getStorageClass().isEmpty()) {
storageClass_ = other.storageClass_;
onChanged();
}
if (other.getClassSize() != 0L) {
setClassSize(other.getClassSize());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object storageClass_ = "";
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @param value The storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClass(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
storageClass_ = value;
onChanged();
return this;
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return This builder for chaining.
*/
public Builder clearStorageClass() {
storageClass_ = getDefaultInstance().getStorageClass();
onChanged();
return this;
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @param value The bytes for storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClassBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
storageClass_ = value;
onChanged();
return this;
}
private long classSize_ ;
/**
*
* Size of used space in the bucket for the storage class.
*
*
* int64 class_size = 2;
* @return The classSize.
*/
@java.lang.Override
public long getClassSize() {
return classSize_;
}
/**
*
* Size of used space in the bucket for the storage class.
*
*
* int64 class_size = 2;
* @param value The classSize to set.
* @return This builder for chaining.
*/
public Builder setClassSize(long value) {
classSize_ = value;
onChanged();
return this;
}
/**
*
* Size of used space in the bucket for the storage class.
*
*
* int64 class_size = 2;
* @return This builder for chaining.
*/
public Builder clearClassSize() {
classSize_ = 0L;
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:yandex.cloud.storage.v1.SizeByClass)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.SizeByClass)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SizeByClass parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SizeByClass(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.SizeByClass getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CountersByClassOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.CountersByClass)
com.google.protobuf.MessageOrBuilder {
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
com.google.protobuf.ByteString
getStorageClassBytes();
/**
*
* Object-related statistics for the storage class by type of upload.
*
*
* .yandex.cloud.storage.v1.Counters counters = 2;
* @return Whether the counters field is set.
*/
boolean hasCounters();
/**
*
* Object-related statistics for the storage class by type of upload.
*
* A resource for object-related statistics for a storage class by type of upload (simple vs. multipart).
*
*
* Protobuf type {@code yandex.cloud.storage.v1.CountersByClass}
*/
public static final class CountersByClass extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.CountersByClass)
CountersByClassOrBuilder {
private static final long serialVersionUID = 0L;
// Use CountersByClass.newBuilder() to construct.
private CountersByClass(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CountersByClass() {
storageClass_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CountersByClass();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CountersByClass(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
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();
storageClass_ = s;
break;
}
case 18: {
yandex.cloud.api.storage.v1.BucketOuterClass.Counters.Builder subBuilder = null;
if (counters_ != null) {
subBuilder = counters_.toBuilder();
}
counters_ = input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.Counters.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(counters_);
counters_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_CountersByClass_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_CountersByClass_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass.class, yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass.Builder.class);
}
public static final int STORAGE_CLASS_FIELD_NUMBER = 1;
private volatile java.lang.Object storageClass_;
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int COUNTERS_FIELD_NUMBER = 2;
private yandex.cloud.api.storage.v1.BucketOuterClass.Counters counters_;
/**
*
* Object-related statistics for the storage class by type of upload.
*
*
* .yandex.cloud.storage.v1.Counters counters = 2;
* @return Whether the counters field is set.
*/
@java.lang.Override
public boolean hasCounters() {
return counters_ != null;
}
/**
*
* Object-related statistics for the storage class by type of upload.
*
* Object-related statistics for the storage class by type of upload.
*
*
* .yandex.cloud.storage.v1.Counters counters = 2;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CountersOrBuilder getCountersOrBuilder() {
return getCounters();
}
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(storageClass_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, storageClass_);
}
if (counters_ != null) {
output.writeMessage(2, getCounters());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, storageClass_);
}
if (counters_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getCounters());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass other = (yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass) obj;
if (!getStorageClass()
.equals(other.getStorageClass())) return false;
if (hasCounters() != other.hasCounters()) return false;
if (hasCounters()) {
if (!getCounters()
.equals(other.getCounters())) return false;
}
if (!unknownFields.equals(other.unknownFields)) 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) + STORAGE_CLASS_FIELD_NUMBER;
hash = (53 * hash) + getStorageClass().hashCode();
if (hasCounters()) {
hash = (37 * hash) + COUNTERS_FIELD_NUMBER;
hash = (53 * hash) + getCounters().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass 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 yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass 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 yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass 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(yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass 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;
}
/**
*
* A resource for object-related statistics for a storage class by type of upload (simple vs. multipart).
*
*
* Protobuf type {@code yandex.cloud.storage.v1.CountersByClass}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.CountersByClass)
yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClassOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_CountersByClass_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_CountersByClass_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass.class, yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
storageClass_ = "";
if (countersBuilder_ == null) {
counters_ = null;
} else {
counters_ = null;
countersBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_CountersByClass_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass build() {
yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass result = new yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass(this);
result.storageClass_ = storageClass_;
if (countersBuilder_ == null) {
result.counters_ = counters_;
} else {
result.counters_ = countersBuilder_.build();
}
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass.getDefaultInstance()) return this;
if (!other.getStorageClass().isEmpty()) {
storageClass_ = other.storageClass_;
onChanged();
}
if (other.hasCounters()) {
mergeCounters(other.getCounters());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClass) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object storageClass_ = "";
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return The bytes for storageClass.
*/
public com.google.protobuf.ByteString
getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @param value The storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClass(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
storageClass_ = value;
onChanged();
return this;
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @return This builder for chaining.
*/
public Builder clearStorageClass() {
storageClass_ = getDefaultInstance().getStorageClass();
onChanged();
return this;
}
/**
*
* Storage class. Supported classes are standard storage (`STANDARD`), cold storage (`COLD`, `STANDARD_IA`, `NEARLINE`
* all synonyms), and ice storage (`ice` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* string storage_class = 1;
* @param value The bytes for storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClassBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
storageClass_ = value;
onChanged();
return this;
}
private yandex.cloud.api.storage.v1.BucketOuterClass.Counters counters_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.Counters, yandex.cloud.api.storage.v1.BucketOuterClass.Counters.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.CountersOrBuilder> countersBuilder_;
/**
*
* Object-related statistics for the storage class by type of upload.
*
*
* .yandex.cloud.storage.v1.Counters counters = 2;
* @return Whether the counters field is set.
*/
public boolean hasCounters() {
return countersBuilder_ != null || counters_ != null;
}
/**
*
* Object-related statistics for the storage class by type of upload.
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* .google.protobuf.StringValue default_storage_class = 7;
* @return Whether the defaultStorageClass field is set.
*/
boolean hasDefaultStorageClass();
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 8;
* @return Whether the anonymousAccessFlags field is set.
*/
boolean hasAnonymousAccessFlags();
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Object-related statistics by storage class and type of upload (simple vs. multipart), in bytes.
*
*
* repeated .yandex.cloud.storage.v1.CountersByClass storage_class_counters = 6;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.CountersByClassOrBuilder getStorageClassCountersOrBuilder(
int index) {
return storageClassCounters_.get(index);
}
public static final int DEFAULT_STORAGE_CLASS_FIELD_NUMBER = 7;
private com.google.protobuf.StringValue defaultStorageClass_;
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* .google.protobuf.StringValue default_storage_class = 7;
* @return Whether the defaultStorageClass field is set.
*/
@java.lang.Override
public boolean hasDefaultStorageClass() {
return defaultStorageClass_ != null;
}
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* .google.protobuf.StringValue default_storage_class = 7;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getDefaultStorageClassOrBuilder() {
return getDefaultStorageClass();
}
public static final int ANONYMOUS_ACCESS_FLAGS_FIELD_NUMBER = 8;
private yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags anonymousAccessFlags_;
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 8;
* @return Whether the anonymousAccessFlags field is set.
*/
@java.lang.Override
public boolean hasAnonymousAccessFlags() {
return anonymousAccessFlags_ != null;
}
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 8;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlagsOrBuilder getAnonymousAccessFlagsOrBuilder() {
return getAnonymousAccessFlags();
}
public static final int CREATED_AT_FIELD_NUMBER = 9;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* Bucket creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 9;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
*
* string name = 1;
* @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;
}
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @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;
}
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @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;
onChanged();
return this;
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @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;
onChanged();
return this;
}
private com.google.protobuf.Int64Value maxSize_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> maxSizeBuilder_;
/**
*
* Maximum size of the bucket, in bytes.
*
*
* .google.protobuf.Int64Value max_size = 2;
* @return Whether the maxSize field is set.
*/
public boolean hasMaxSize() {
return maxSizeBuilder_ != null || maxSize_ != null;
}
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* .google.protobuf.StringValue default_storage_class = 7;
* @return Whether the defaultStorageClass field is set.
*/
public boolean hasDefaultStorageClass() {
return defaultStorageClassBuilder_ != null || defaultStorageClass_ != null;
}
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
*
* .google.protobuf.StringValue default_storage_class = 7;
*/
public Builder setDefaultStorageClass(com.google.protobuf.StringValue value) {
if (defaultStorageClassBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
defaultStorageClass_ = value;
onChanged();
} else {
defaultStorageClassBuilder_.setMessage(value);
}
return this;
}
/**
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Default storage class for objects in the bucket. Supported classes are standard storage (`STANDARD`), cold storage
* (`COLD`, `STANDARD_IA`, `NEARLINE` all synonyms), and ice storage (`ICE` and `GLACIER` are synonyms).
* For details, see [documentation](/docs/storage/concepts/storage-class).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 8;
* @return Whether the anonymousAccessFlags field is set.
*/
public boolean hasAnonymousAccessFlags() {
return anonymousAccessFlagsBuilder_ != null || anonymousAccessFlags_ != null;
}
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .yandex.cloud.storage.v1.AnonymousAccessFlags anonymous_access_flags = 8;
*/
public Builder setAnonymousAccessFlags(yandex.cloud.api.storage.v1.BucketOuterClass.AnonymousAccessFlags value) {
if (anonymousAccessFlagsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
anonymousAccessFlags_ = value;
onChanged();
} else {
anonymousAccessFlagsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
* Flags for configuring public (anonymous) access to the bucket's content and settings.
* For details, see [documentation](/docs/storage/concepts/bucket#bucket-access).
*
*
* .google.protobuf.Timestamp updated_at = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getUpdatedAtFieldBuilder() {
if (updatedAtBuilder_ == null) {
updatedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getUpdatedAt(),
getParentForChildren(),
isClean());
updatedAt_ = null;
}
return updatedAtBuilder_;
}
@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:yandex.cloud.storage.v1.BucketStats)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.BucketStats)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.BucketStats DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.BucketStats();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.BucketStats getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BucketStats parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BucketStats(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.BucketStats getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HTTPSConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.HTTPSConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Type of TLS certificate source.
*
*
* .yandex.cloud.storage.v1.HTTPSConfig.SourceType source_type = 2;
* @return The enum numeric value on the wire for sourceType.
*/
int getSourceTypeValue();
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @return A list containing the dnsNames.
*/
java.util.List
getDnsNamesList();
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @return The count of dnsNames.
*/
int getDnsNamesCount();
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param index The index of the element to return.
* @return The dnsNames at the given index.
*/
java.lang.String getDnsNames(int index);
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param index The index of the value to return.
* @return The bytes of the dnsNames at the given index.
*/
com.google.protobuf.ByteString
getDnsNamesBytes(int index);
/**
*
* Start of the TLS certificate validity period (Not Before field).
*
*
* .google.protobuf.Timestamp not_before = 6;
* @return Whether the notBefore field is set.
*/
boolean hasNotBefore();
/**
*
* Start of the TLS certificate validity period (Not Before field).
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
*
* string certificate_id = 8;
* @return The bytes for certificateId.
*/
com.google.protobuf.ByteString
getCertificateIdBytes();
}
/**
*
* A resource for HTTPS configuration of a bucket.
*
*
* Protobuf type {@code yandex.cloud.storage.v1.HTTPSConfig}
*/
public static final class HTTPSConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.HTTPSConfig)
HTTPSConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use HTTPSConfig.newBuilder() to construct.
private HTTPSConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HTTPSConfig() {
name_ = "";
sourceType_ = 0;
dnsNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
certificateId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HTTPSConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HTTPSConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
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();
name_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
sourceType_ = rawValue;
break;
}
case 26: {
com.google.protobuf.StringValue.Builder subBuilder = null;
if (issuer_ != null) {
subBuilder = issuer_.toBuilder();
}
issuer_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(issuer_);
issuer_ = subBuilder.buildPartial();
}
break;
}
case 34: {
com.google.protobuf.StringValue.Builder subBuilder = null;
if (subject_ != null) {
subBuilder = subject_.toBuilder();
}
subject_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(subject_);
subject_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
dnsNames_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
dnsNames_.add(s);
break;
}
case 50: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (notBefore_ != null) {
subBuilder = notBefore_.toBuilder();
}
notBefore_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(notBefore_);
notBefore_ = subBuilder.buildPartial();
}
break;
}
case 58: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (notAfter_ != null) {
subBuilder = notAfter_.toBuilder();
}
notAfter_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(notAfter_);
notAfter_ = subBuilder.buildPartial();
}
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
certificateId_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
dnsNames_ = dnsNames_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_HTTPSConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_HTTPSConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.class, yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.Builder.class);
}
/**
*
* A resource for type of TLS certificate source.
*
*
* SOURCE_TYPE_MANAGED_BY_CERTIFICATE_MANAGER = 2;
*/
SOURCE_TYPE_MANAGED_BY_CERTIFICATE_MANAGER(2),
UNRECOGNIZED(-1),
;
/**
* SOURCE_TYPE_UNSPECIFIED = 0;
*/
public static final int SOURCE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Your certificate, uploaded directly.
*
*
* SOURCE_TYPE_SELF_MANAGED = 1;
*/
public static final int SOURCE_TYPE_SELF_MANAGED_VALUE = 1;
/**
*
* Certificate managed by Certificate Manager.
*
*
* SOURCE_TYPE_MANAGED_BY_CERTIFICATE_MANAGER = 2;
*/
public static final int SOURCE_TYPE_MANAGED_BY_CERTIFICATE_MANAGER_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 SourceType 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 SourceType forNumber(int value) {
switch (value) {
case 0: return SOURCE_TYPE_UNSPECIFIED;
case 1: return SOURCE_TYPE_SELF_MANAGED;
case 2: return SOURCE_TYPE_MANAGED_BY_CERTIFICATE_MANAGER;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
SourceType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SourceType findValueByNumber(int number) {
return SourceType.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 yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.getDescriptor().getEnumTypes().get(0);
}
private static final SourceType[] VALUES = values();
public static SourceType 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 SourceType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.storage.v1.HTTPSConfig.SourceType)
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @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;
}
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @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 SOURCE_TYPE_FIELD_NUMBER = 2;
private int sourceType_;
/**
*
* Type of TLS certificate source.
*
*
* .yandex.cloud.storage.v1.HTTPSConfig.SourceType source_type = 2;
* @return The enum numeric value on the wire for sourceType.
*/
@java.lang.Override public int getSourceTypeValue() {
return sourceType_;
}
/**
*
* Type of TLS certificate source.
*
*
* .yandex.cloud.storage.v1.HTTPSConfig.SourceType source_type = 2;
* @return The sourceType.
*/
@java.lang.Override public yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType getSourceType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType result = yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType.valueOf(sourceType_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType.UNRECOGNIZED : result;
}
public static final int ISSUER_FIELD_NUMBER = 3;
private com.google.protobuf.StringValue issuer_;
/**
*
* Issuer of the TLS certificate.
*
*
* .google.protobuf.StringValue issuer = 3;
* @return Whether the issuer field is set.
*/
@java.lang.Override
public boolean hasIssuer() {
return issuer_ != null;
}
/**
*
*
* .google.protobuf.StringValue subject = 4;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getSubjectOrBuilder() {
return getSubject();
}
public static final int DNS_NAMES_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList dnsNames_;
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @return A list containing the dnsNames.
*/
public com.google.protobuf.ProtocolStringList
getDnsNamesList() {
return dnsNames_;
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @return The count of dnsNames.
*/
public int getDnsNamesCount() {
return dnsNames_.size();
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param index The index of the element to return.
* @return The dnsNames at the given index.
*/
public java.lang.String getDnsNames(int index) {
return dnsNames_.get(index);
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param index The index of the value to return.
* @return The bytes of the dnsNames at the given index.
*/
public com.google.protobuf.ByteString
getDnsNamesBytes(int index) {
return dnsNames_.getByteString(index);
}
public static final int NOT_BEFORE_FIELD_NUMBER = 6;
private com.google.protobuf.Timestamp notBefore_;
/**
*
* Start of the TLS certificate validity period (Not Before field).
*
*
* .google.protobuf.Timestamp not_before = 6;
* @return Whether the notBefore field is set.
*/
@java.lang.Override
public boolean hasNotBefore() {
return notBefore_ != null;
}
/**
*
* Start of the TLS certificate validity period (Not Before field).
*
* End of the TLS certificate validity period (Not After field)
*
*
* .google.protobuf.Timestamp not_after = 7;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getNotAfterOrBuilder() {
return getNotAfter();
}
public static final int CERTIFICATE_ID_FIELD_NUMBER = 8;
private volatile java.lang.Object certificateId_;
/**
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
*
* string certificate_id = 8;
* @return The bytes for certificateId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCertificateIdBytes() {
java.lang.Object ref = certificateId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
certificateId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (sourceType_ != yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType.SOURCE_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(2, sourceType_);
}
if (issuer_ != null) {
output.writeMessage(3, getIssuer());
}
if (subject_ != null) {
output.writeMessage(4, getSubject());
}
for (int i = 0; i < dnsNames_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, dnsNames_.getRaw(i));
}
if (notBefore_ != null) {
output.writeMessage(6, getNotBefore());
}
if (notAfter_ != null) {
output.writeMessage(7, getNotAfter());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(certificateId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, certificateId_);
}
unknownFields.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 (sourceType_ != yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType.SOURCE_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, sourceType_);
}
if (issuer_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getIssuer());
}
if (subject_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getSubject());
}
{
int dataSize = 0;
for (int i = 0; i < dnsNames_.size(); i++) {
dataSize += computeStringSizeNoTag(dnsNames_.getRaw(i));
}
size += dataSize;
size += 1 * getDnsNamesList().size();
}
if (notBefore_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getNotBefore());
}
if (notAfter_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getNotAfter());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(certificateId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, certificateId_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig other = (yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig) obj;
if (!getName()
.equals(other.getName())) return false;
if (sourceType_ != other.sourceType_) return false;
if (hasIssuer() != other.hasIssuer()) return false;
if (hasIssuer()) {
if (!getIssuer()
.equals(other.getIssuer())) return false;
}
if (hasSubject() != other.hasSubject()) return false;
if (hasSubject()) {
if (!getSubject()
.equals(other.getSubject())) return false;
}
if (!getDnsNamesList()
.equals(other.getDnsNamesList())) return false;
if (hasNotBefore() != other.hasNotBefore()) return false;
if (hasNotBefore()) {
if (!getNotBefore()
.equals(other.getNotBefore())) return false;
}
if (hasNotAfter() != other.hasNotAfter()) return false;
if (hasNotAfter()) {
if (!getNotAfter()
.equals(other.getNotAfter())) return false;
}
if (!getCertificateId()
.equals(other.getCertificateId())) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + SOURCE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + sourceType_;
if (hasIssuer()) {
hash = (37 * hash) + ISSUER_FIELD_NUMBER;
hash = (53 * hash) + getIssuer().hashCode();
}
if (hasSubject()) {
hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
hash = (53 * hash) + getSubject().hashCode();
}
if (getDnsNamesCount() > 0) {
hash = (37 * hash) + DNS_NAMES_FIELD_NUMBER;
hash = (53 * hash) + getDnsNamesList().hashCode();
}
if (hasNotBefore()) {
hash = (37 * hash) + NOT_BEFORE_FIELD_NUMBER;
hash = (53 * hash) + getNotBefore().hashCode();
}
if (hasNotAfter()) {
hash = (37 * hash) + NOT_AFTER_FIELD_NUMBER;
hash = (53 * hash) + getNotAfter().hashCode();
}
hash = (37 * hash) + CERTIFICATE_ID_FIELD_NUMBER;
hash = (53 * hash) + getCertificateId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig 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 yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig 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 yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig 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(yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig 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;
}
/**
*
* A resource for HTTPS configuration of a bucket.
*
*
* string name = 1;
* @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;
}
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @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;
}
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @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;
onChanged();
return this;
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the bucket.
*
*
* string name = 1;
* @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;
onChanged();
return this;
}
private int sourceType_ = 0;
/**
*
* Type of TLS certificate source.
*
*
* .yandex.cloud.storage.v1.HTTPSConfig.SourceType source_type = 2;
* @return The enum numeric value on the wire for sourceType.
*/
@java.lang.Override public int getSourceTypeValue() {
return sourceType_;
}
/**
*
* Type of TLS certificate source.
*
*
* .yandex.cloud.storage.v1.HTTPSConfig.SourceType source_type = 2;
* @param value The enum numeric value on the wire for sourceType to set.
* @return This builder for chaining.
*/
public Builder setSourceTypeValue(int value) {
sourceType_ = value;
onChanged();
return this;
}
/**
*
* Type of TLS certificate source.
*
*
* .yandex.cloud.storage.v1.HTTPSConfig.SourceType source_type = 2;
* @return The sourceType.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType getSourceType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType result = yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType.valueOf(sourceType_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType.UNRECOGNIZED : result;
}
/**
*
* Type of TLS certificate source.
*
*
* .yandex.cloud.storage.v1.HTTPSConfig.SourceType source_type = 2;
* @param value The sourceType to set.
* @return This builder for chaining.
*/
public Builder setSourceType(yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig.SourceType value) {
if (value == null) {
throw new NullPointerException();
}
sourceType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @return A list containing the dnsNames.
*/
public com.google.protobuf.ProtocolStringList
getDnsNamesList() {
return dnsNames_.getUnmodifiableView();
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @return The count of dnsNames.
*/
public int getDnsNamesCount() {
return dnsNames_.size();
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param index The index of the element to return.
* @return The dnsNames at the given index.
*/
public java.lang.String getDnsNames(int index) {
return dnsNames_.get(index);
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param index The index of the value to return.
* @return The bytes of the dnsNames at the given index.
*/
public com.google.protobuf.ByteString
getDnsNamesBytes(int index) {
return dnsNames_.getByteString(index);
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param index The index to set the value at.
* @param value The dnsNames to set.
* @return This builder for chaining.
*/
public Builder setDnsNames(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDnsNamesIsMutable();
dnsNames_.set(index, value);
onChanged();
return this;
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param value The dnsNames to add.
* @return This builder for chaining.
*/
public Builder addDnsNames(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDnsNamesIsMutable();
dnsNames_.add(value);
onChanged();
return this;
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
*
* repeated string dns_names = 5;
* @param values The dnsNames to add.
* @return This builder for chaining.
*/
public Builder addAllDnsNames(
java.lang.Iterable values) {
ensureDnsNamesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, dnsNames_);
onChanged();
return this;
}
/**
*
* List of DNS names of the TLS certificate (Subject Alternative Name field).
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
*
* string certificate_id = 8;
* @return The bytes for certificateId.
*/
public com.google.protobuf.ByteString
getCertificateIdBytes() {
java.lang.Object ref = certificateId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
certificateId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
*
* string certificate_id = 8;
* @param value The certificateId to set.
* @return This builder for chaining.
*/
public Builder setCertificateId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
certificateId_ = value;
onChanged();
return this;
}
/**
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
*
* string certificate_id = 8;
* @return This builder for chaining.
*/
public Builder clearCertificateId() {
certificateId_ = getDefaultInstance().getCertificateId();
onChanged();
return this;
}
/**
*
* ID of the TLS certificate in Certificate Manager.
* To get information about the certificate from Certificate Manager, make a
* [yandex.cloud.certificatemanager.v1.CertificateService.Get] request.
*
*
* string certificate_id = 8;
* @param value The bytes for certificateId to set.
* @return This builder for chaining.
*/
public Builder setCertificateIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
certificateId_ = 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:yandex.cloud.storage.v1.HTTPSConfig)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.HTTPSConfig)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HTTPSConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HTTPSConfig(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.HTTPSConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ObjectLockOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.ObjectLock)
com.google.protobuf.MessageOrBuilder {
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @return The status.
*/
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus getStatus();
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
* @return Whether the defaultRetention field is set.
*/
boolean hasDefaultRetention();
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
* @return The defaultRetention.
*/
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention getDefaultRetention();
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetentionOrBuilder getDefaultRetentionOrBuilder();
}
/**
*
* A resource for Object Lock configuration of a bucket.
* For details about the concept, see [documentation](/docs/storage/concepts/object-lock).
*
*
* Protobuf type {@code yandex.cloud.storage.v1.ObjectLock}
*/
public static final class ObjectLock extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.ObjectLock)
ObjectLockOrBuilder {
private static final long serialVersionUID = 0L;
// Use ObjectLock.newBuilder() to construct.
private ObjectLock(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ObjectLock() {
status_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ObjectLock();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ObjectLock(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 16: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 26: {
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Builder subBuilder = null;
if (defaultRetention_ != null) {
subBuilder = defaultRetention_.toBuilder();
}
defaultRetention_ = input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(defaultRetention_);
defaultRetention_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.class, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.Builder.class);
}
/**
*
* Activity status of the object lock settings on the bucket
*
*
* Protobuf enum {@code yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus}
*/
public enum ObjectLockStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
* OBJECT_LOCK_STATUS_UNSPECIFIED = 0;
*/
OBJECT_LOCK_STATUS_UNSPECIFIED(0),
/**
* OBJECT_LOCK_STATUS_DISABLED = 1;
*/
OBJECT_LOCK_STATUS_DISABLED(1),
/**
* OBJECT_LOCK_STATUS_ENABLED = 2;
*/
OBJECT_LOCK_STATUS_ENABLED(2),
UNRECOGNIZED(-1),
;
/**
* OBJECT_LOCK_STATUS_UNSPECIFIED = 0;
*/
public static final int OBJECT_LOCK_STATUS_UNSPECIFIED_VALUE = 0;
/**
* OBJECT_LOCK_STATUS_DISABLED = 1;
*/
public static final int OBJECT_LOCK_STATUS_DISABLED_VALUE = 1;
/**
* OBJECT_LOCK_STATUS_ENABLED = 2;
*/
public static final int OBJECT_LOCK_STATUS_ENABLED_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 ObjectLockStatus 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 ObjectLockStatus forNumber(int value) {
switch (value) {
case 0: return OBJECT_LOCK_STATUS_UNSPECIFIED;
case 1: return OBJECT_LOCK_STATUS_DISABLED;
case 2: return OBJECT_LOCK_STATUS_ENABLED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ObjectLockStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ObjectLockStatus findValueByNumber(int number) {
return ObjectLockStatus.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 yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.getDescriptor().getEnumTypes().get(0);
}
private static final ObjectLockStatus[] VALUES = values();
public static ObjectLockStatus 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 ObjectLockStatus(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus)
}
public interface DefaultRetentionOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.ObjectLock.DefaultRetention)
com.google.protobuf.MessageOrBuilder {
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @return The enum numeric value on the wire for mode.
*/
int getModeValue();
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @return The mode.
*/
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode getMode();
/**
*
* Number of days for locking
*
*
* int64 days = 2;
* @return Whether the days field is set.
*/
boolean hasDays();
/**
*
* Number of days for locking
*
*
* int64 days = 2;
* @return The days.
*/
long getDays();
/**
*
* Number of years for locking
*
*
* int64 years = 3;
* @return Whether the years field is set.
*/
boolean hasYears();
/**
*
* Number of years for locking
*
*
* int64 years = 3;
* @return The years.
*/
long getYears();
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.PeriodCase getPeriodCase();
}
/**
*
* Default lock configuration for added objects
*
*
* Protobuf type {@code yandex.cloud.storage.v1.ObjectLock.DefaultRetention}
*/
public static final class DefaultRetention extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.ObjectLock.DefaultRetention)
DefaultRetentionOrBuilder {
private static final long serialVersionUID = 0L;
// Use DefaultRetention.newBuilder() to construct.
private DefaultRetention(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DefaultRetention() {
mode_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DefaultRetention();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DefaultRetention(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
mode_ = rawValue;
break;
}
case 16: {
period_ = input.readInt64();
periodCase_ = 2;
break;
}
case 24: {
period_ = input.readInt64();
periodCase_ = 3;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_DefaultRetention_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_DefaultRetention_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.class, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Builder.class);
}
/**
*
* Lock type
*
*
* Protobuf enum {@code yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode}
*/
public enum Mode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* MODE_UNSPECIFIED = 0;
*/
MODE_UNSPECIFIED(0),
/**
* MODE_GOVERNANCE = 1;
*/
MODE_GOVERNANCE(1),
/**
* MODE_COMPLIANCE = 2;
*/
MODE_COMPLIANCE(2),
UNRECOGNIZED(-1),
;
/**
* MODE_UNSPECIFIED = 0;
*/
public static final int MODE_UNSPECIFIED_VALUE = 0;
/**
* MODE_GOVERNANCE = 1;
*/
public static final int MODE_GOVERNANCE_VALUE = 1;
/**
* MODE_COMPLIANCE = 2;
*/
public static final int MODE_COMPLIANCE_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 Mode 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 Mode forNumber(int value) {
switch (value) {
case 0: return MODE_UNSPECIFIED;
case 1: return MODE_GOVERNANCE;
case 2: return MODE_COMPLIANCE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Mode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Mode findValueByNumber(int number) {
return Mode.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 yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.getDescriptor().getEnumTypes().get(0);
}
private static final Mode[] VALUES = values();
public static Mode 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 Mode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode)
}
private int periodCase_ = 0;
private java.lang.Object period_;
public enum PeriodCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
DAYS(2),
YEARS(3),
PERIOD_NOT_SET(0);
private final int value;
private PeriodCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PeriodCase valueOf(int value) {
return forNumber(value);
}
public static PeriodCase forNumber(int value) {
switch (value) {
case 2: return DAYS;
case 3: return YEARS;
case 0: return PERIOD_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PeriodCase
getPeriodCase() {
return PeriodCase.forNumber(
periodCase_);
}
public static final int MODE_FIELD_NUMBER = 1;
private int mode_;
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @return The enum numeric value on the wire for mode.
*/
@java.lang.Override public int getModeValue() {
return mode_;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @return The mode.
*/
@java.lang.Override public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode getMode() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode result = yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode.valueOf(mode_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode.UNRECOGNIZED : result;
}
public static final int DAYS_FIELD_NUMBER = 2;
/**
*
* Number of days for locking
*
*
* int64 days = 2;
* @return Whether the days field is set.
*/
@java.lang.Override
public boolean hasDays() {
return periodCase_ == 2;
}
/**
*
* Number of days for locking
*
*
* int64 days = 2;
* @return The days.
*/
@java.lang.Override
public long getDays() {
if (periodCase_ == 2) {
return (java.lang.Long) period_;
}
return 0L;
}
public static final int YEARS_FIELD_NUMBER = 3;
/**
*
* Number of years for locking
*
*
* int64 years = 3;
* @return Whether the years field is set.
*/
@java.lang.Override
public boolean hasYears() {
return periodCase_ == 3;
}
/**
*
* Number of years for locking
*
*
* int64 years = 3;
* @return The years.
*/
@java.lang.Override
public long getYears() {
if (periodCase_ == 3) {
return (java.lang.Long) period_;
}
return 0L;
}
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 (mode_ != yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode.MODE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, mode_);
}
if (periodCase_ == 2) {
output.writeInt64(
2, (long)((java.lang.Long) period_));
}
if (periodCase_ == 3) {
output.writeInt64(
3, (long)((java.lang.Long) period_));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (mode_ != yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode.MODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, mode_);
}
if (periodCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
2, (long)((java.lang.Long) period_));
}
if (periodCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
3, (long)((java.lang.Long) period_));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention other = (yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention) obj;
if (mode_ != other.mode_) return false;
if (!getPeriodCase().equals(other.getPeriodCase())) return false;
switch (periodCase_) {
case 2:
if (getDays()
!= other.getDays()) return false;
break;
case 3:
if (getYears()
!= other.getYears()) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) 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) + MODE_FIELD_NUMBER;
hash = (53 * hash) + mode_;
switch (periodCase_) {
case 2:
hash = (37 * hash) + DAYS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getDays());
break;
case 3:
hash = (37 * hash) + YEARS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getYears());
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention 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 yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention 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 yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention 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(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention 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;
}
/**
*
* Default lock configuration for added objects
*
*
* Protobuf type {@code yandex.cloud.storage.v1.ObjectLock.DefaultRetention}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.ObjectLock.DefaultRetention)
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetentionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_DefaultRetention_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_DefaultRetention_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.class, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
mode_ = 0;
periodCase_ = 0;
period_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_DefaultRetention_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention build() {
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention result = new yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention(this);
result.mode_ = mode_;
if (periodCase_ == 2) {
result.period_ = period_;
}
if (periodCase_ == 3) {
result.period_ = period_;
}
result.periodCase_ = periodCase_;
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.getDefaultInstance()) return this;
if (other.mode_ != 0) {
setModeValue(other.getModeValue());
}
switch (other.getPeriodCase()) {
case DAYS: {
setDays(other.getDays());
break;
}
case YEARS: {
setYears(other.getYears());
break;
}
case PERIOD_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int periodCase_ = 0;
private java.lang.Object period_;
public PeriodCase
getPeriodCase() {
return PeriodCase.forNumber(
periodCase_);
}
public Builder clearPeriod() {
periodCase_ = 0;
period_ = null;
onChanged();
return this;
}
private int mode_ = 0;
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @return The enum numeric value on the wire for mode.
*/
@java.lang.Override public int getModeValue() {
return mode_;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @param value The enum numeric value on the wire for mode to set.
* @return This builder for chaining.
*/
public Builder setModeValue(int value) {
mode_ = value;
onChanged();
return this;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @return The mode.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode getMode() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode result = yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode.valueOf(mode_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode.UNRECOGNIZED : result;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @param value The mode to set.
* @return This builder for chaining.
*/
public Builder setMode(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Mode value) {
if (value == null) {
throw new NullPointerException();
}
mode_ = value.getNumber();
onChanged();
return this;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention.Mode mode = 1;
* @return This builder for chaining.
*/
public Builder clearMode() {
mode_ = 0;
onChanged();
return this;
}
/**
*
* Number of days for locking
*
*
* int64 days = 2;
* @return Whether the days field is set.
*/
public boolean hasDays() {
return periodCase_ == 2;
}
/**
*
* Number of days for locking
*
*
* int64 days = 2;
* @return The days.
*/
public long getDays() {
if (periodCase_ == 2) {
return (java.lang.Long) period_;
}
return 0L;
}
/**
*
* Number of days for locking
*
*
* int64 days = 2;
* @param value The days to set.
* @return This builder for chaining.
*/
public Builder setDays(long value) {
periodCase_ = 2;
period_ = value;
onChanged();
return this;
}
/**
*
* Number of days for locking
*
*
* int64 days = 2;
* @return This builder for chaining.
*/
public Builder clearDays() {
if (periodCase_ == 2) {
periodCase_ = 0;
period_ = null;
onChanged();
}
return this;
}
/**
*
* Number of years for locking
*
*
* int64 years = 3;
* @return Whether the years field is set.
*/
public boolean hasYears() {
return periodCase_ == 3;
}
/**
*
* Number of years for locking
*
*
* int64 years = 3;
* @return The years.
*/
public long getYears() {
if (periodCase_ == 3) {
return (java.lang.Long) period_;
}
return 0L;
}
/**
*
* Number of years for locking
*
*
* int64 years = 3;
* @param value The years to set.
* @return This builder for chaining.
*/
public Builder setYears(long value) {
periodCase_ = 3;
period_ = value;
onChanged();
return this;
}
/**
*
* Number of years for locking
*
*
* int64 years = 3;
* @return This builder for chaining.
*/
public Builder clearYears() {
if (periodCase_ == 3) {
periodCase_ = 0;
period_ = null;
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:yandex.cloud.storage.v1.ObjectLock.DefaultRetention)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.ObjectLock.DefaultRetention)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DefaultRetention parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DefaultRetention(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int STATUS_FIELD_NUMBER = 2;
private int status_;
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @return The status.
*/
@java.lang.Override public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus result = yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus.valueOf(status_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus.UNRECOGNIZED : result;
}
public static final int DEFAULT_RETENTION_FIELD_NUMBER = 3;
private yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention defaultRetention_;
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
* @return Whether the defaultRetention field is set.
*/
@java.lang.Override
public boolean hasDefaultRetention() {
return defaultRetention_ != null;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
* @return The defaultRetention.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention getDefaultRetention() {
return defaultRetention_ == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.getDefaultInstance() : defaultRetention_;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetentionOrBuilder getDefaultRetentionOrBuilder() {
return getDefaultRetention();
}
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 (status_ != yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus.OBJECT_LOCK_STATUS_UNSPECIFIED.getNumber()) {
output.writeEnum(2, status_);
}
if (defaultRetention_ != null) {
output.writeMessage(3, getDefaultRetention());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (status_ != yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus.OBJECT_LOCK_STATUS_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, status_);
}
if (defaultRetention_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getDefaultRetention());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock other = (yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock) obj;
if (status_ != other.status_) return false;
if (hasDefaultRetention() != other.hasDefaultRetention()) return false;
if (hasDefaultRetention()) {
if (!getDefaultRetention()
.equals(other.getDefaultRetention())) return false;
}
if (!unknownFields.equals(other.unknownFields)) 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) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
if (hasDefaultRetention()) {
hash = (37 * hash) + DEFAULT_RETENTION_FIELD_NUMBER;
hash = (53 * hash) + getDefaultRetention().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock 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 yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock 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 yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock 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(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock 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;
}
/**
*
* A resource for Object Lock configuration of a bucket.
* For details about the concept, see [documentation](/docs/storage/concepts/object-lock).
*
*
* Protobuf type {@code yandex.cloud.storage.v1.ObjectLock}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.ObjectLock)
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLockOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.class, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
status_ = 0;
if (defaultRetentionBuilder_ == null) {
defaultRetention_ = null;
} else {
defaultRetention_ = null;
defaultRetentionBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_ObjectLock_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock build() {
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock result = new yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock(this);
result.status_ = status_;
if (defaultRetentionBuilder_ == null) {
result.defaultRetention_ = defaultRetention_;
} else {
result.defaultRetention_ = defaultRetentionBuilder_.build();
}
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.getDefaultInstance()) return this;
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (other.hasDefaultRetention()) {
mergeDefaultRetention(other.getDefaultRetention());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int status_ = 0;
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @return The status.
*/
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus result = yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus.valueOf(status_);
return result == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus.UNRECOGNIZED : result;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.ObjectLockStatus value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.ObjectLockStatus status = 2;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention defaultRetention_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetentionOrBuilder> defaultRetentionBuilder_;
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
* @return Whether the defaultRetention field is set.
*/
public boolean hasDefaultRetention() {
return defaultRetentionBuilder_ != null || defaultRetention_ != null;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
* @return The defaultRetention.
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention getDefaultRetention() {
if (defaultRetentionBuilder_ == null) {
return defaultRetention_ == null ? yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.getDefaultInstance() : defaultRetention_;
} else {
return defaultRetentionBuilder_.getMessage();
}
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
public Builder setDefaultRetention(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention value) {
if (defaultRetentionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
defaultRetention_ = value;
onChanged();
} else {
defaultRetentionBuilder_.setMessage(value);
}
return this;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
public Builder setDefaultRetention(
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Builder builderForValue) {
if (defaultRetentionBuilder_ == null) {
defaultRetention_ = builderForValue.build();
onChanged();
} else {
defaultRetentionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
public Builder mergeDefaultRetention(yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention value) {
if (defaultRetentionBuilder_ == null) {
if (defaultRetention_ != null) {
defaultRetention_ =
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.newBuilder(defaultRetention_).mergeFrom(value).buildPartial();
} else {
defaultRetention_ = value;
}
onChanged();
} else {
defaultRetentionBuilder_.mergeFrom(value);
}
return this;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
public Builder clearDefaultRetention() {
if (defaultRetentionBuilder_ == null) {
defaultRetention_ = null;
onChanged();
} else {
defaultRetention_ = null;
defaultRetentionBuilder_ = null;
}
return this;
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Builder getDefaultRetentionBuilder() {
onChanged();
return getDefaultRetentionFieldBuilder().getBuilder();
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetentionOrBuilder getDefaultRetentionOrBuilder() {
if (defaultRetentionBuilder_ != null) {
return defaultRetentionBuilder_.getMessageOrBuilder();
} else {
return defaultRetention_ == null ?
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.getDefaultInstance() : defaultRetention_;
}
}
/**
* .yandex.cloud.storage.v1.ObjectLock.DefaultRetention default_retention = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetentionOrBuilder>
getDefaultRetentionFieldBuilder() {
if (defaultRetentionBuilder_ == null) {
defaultRetentionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetention.Builder, yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock.DefaultRetentionOrBuilder>(
getDefaultRetention(),
getParentForChildren(),
isClean());
defaultRetention_ = null;
}
return defaultRetentionBuilder_;
}
@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:yandex.cloud.storage.v1.ObjectLock)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.ObjectLock)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ObjectLock parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ObjectLock(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.ObjectLock getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EncryptionOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.Encryption)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .yandex.cloud.storage.v1.Encryption.EncryptionRule rules = 1;
*/
java.util.List
getRulesList();
/**
* repeated .yandex.cloud.storage.v1.Encryption.EncryptionRule rules = 1;
*/
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule getRules(int index);
/**
* repeated .yandex.cloud.storage.v1.Encryption.EncryptionRule rules = 1;
*/
int getRulesCount();
/**
* repeated .yandex.cloud.storage.v1.Encryption.EncryptionRule rules = 1;
*/
java.util.List extends yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRuleOrBuilder>
getRulesOrBuilderList();
/**
* repeated .yandex.cloud.storage.v1.Encryption.EncryptionRule rules = 1;
*/
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRuleOrBuilder getRulesOrBuilder(
int index);
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.Encryption}
*/
public static final class Encryption extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.Encryption)
EncryptionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Encryption.newBuilder() to construct.
private Encryption(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Encryption() {
rules_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Encryption();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Encryption(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
rules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
rules_.add(
input.readMessage(yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
rules_ = java.util.Collections.unmodifiableList(rules_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Encryption_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Encryption_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.class, yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.Builder.class);
}
public interface EncryptionRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.storage.v1.Encryption.EncryptionRule)
com.google.protobuf.MessageOrBuilder {
/**
* string kms_master_key_id = 1;
* @return The kmsMasterKeyId.
*/
java.lang.String getKmsMasterKeyId();
/**
* string kms_master_key_id = 1;
* @return The bytes for kmsMasterKeyId.
*/
com.google.protobuf.ByteString
getKmsMasterKeyIdBytes();
/**
* string sse_algorithm = 2;
* @return The sseAlgorithm.
*/
java.lang.String getSseAlgorithm();
/**
* string sse_algorithm = 2;
* @return The bytes for sseAlgorithm.
*/
com.google.protobuf.ByteString
getSseAlgorithmBytes();
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.Encryption.EncryptionRule}
*/
public static final class EncryptionRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.storage.v1.Encryption.EncryptionRule)
EncryptionRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use EncryptionRule.newBuilder() to construct.
private EncryptionRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private EncryptionRule() {
kmsMasterKeyId_ = "";
sseAlgorithm_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new EncryptionRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private EncryptionRule(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
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();
kmsMasterKeyId_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
sseAlgorithm_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Encryption_EncryptionRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Encryption_EncryptionRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule.class, yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule.Builder.class);
}
public static final int KMS_MASTER_KEY_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object kmsMasterKeyId_;
/**
* string kms_master_key_id = 1;
* @return The kmsMasterKeyId.
*/
@java.lang.Override
public java.lang.String getKmsMasterKeyId() {
java.lang.Object ref = kmsMasterKeyId_;
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();
kmsMasterKeyId_ = s;
return s;
}
}
/**
* string kms_master_key_id = 1;
* @return The bytes for kmsMasterKeyId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getKmsMasterKeyIdBytes() {
java.lang.Object ref = kmsMasterKeyId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
kmsMasterKeyId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SSE_ALGORITHM_FIELD_NUMBER = 2;
private volatile java.lang.Object sseAlgorithm_;
/**
* string sse_algorithm = 2;
* @return The sseAlgorithm.
*/
@java.lang.Override
public java.lang.String getSseAlgorithm() {
java.lang.Object ref = sseAlgorithm_;
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();
sseAlgorithm_ = s;
return s;
}
}
/**
* string sse_algorithm = 2;
* @return The bytes for sseAlgorithm.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSseAlgorithmBytes() {
java.lang.Object ref = sseAlgorithm_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sseAlgorithm_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsMasterKeyId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsMasterKeyId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sseAlgorithm_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sseAlgorithm_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsMasterKeyId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsMasterKeyId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sseAlgorithm_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sseAlgorithm_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule)) {
return super.equals(obj);
}
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule other = (yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule) obj;
if (!getKmsMasterKeyId()
.equals(other.getKmsMasterKeyId())) return false;
if (!getSseAlgorithm()
.equals(other.getSseAlgorithm())) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + KMS_MASTER_KEY_ID_FIELD_NUMBER;
hash = (53 * hash) + getKmsMasterKeyId().hashCode();
hash = (37 * hash) + SSE_ALGORITHM_FIELD_NUMBER;
hash = (53 * hash) + getSseAlgorithm().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule 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 yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule 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 yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule 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(yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule 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;
}
/**
* Protobuf type {@code yandex.cloud.storage.v1.Encryption.EncryptionRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.storage.v1.Encryption.EncryptionRule)
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Encryption_EncryptionRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Encryption_EncryptionRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule.class, yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule.Builder.class);
}
// Construct using yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
kmsMasterKeyId_ = "";
sseAlgorithm_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.internal_static_yandex_cloud_storage_v1_Encryption_EncryptionRule_descriptor;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule getDefaultInstanceForType() {
return yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule build() {
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule buildPartial() {
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule result = new yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule(this);
result.kmsMasterKeyId_ = kmsMasterKeyId_;
result.sseAlgorithm_ = sseAlgorithm_;
onBuilt();
return result;
}
@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 yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule) {
return mergeFrom((yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule other) {
if (other == yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule.getDefaultInstance()) return this;
if (!other.getKmsMasterKeyId().isEmpty()) {
kmsMasterKeyId_ = other.kmsMasterKeyId_;
onChanged();
}
if (!other.getSseAlgorithm().isEmpty()) {
sseAlgorithm_ = other.sseAlgorithm_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object kmsMasterKeyId_ = "";
/**
* string kms_master_key_id = 1;
* @return The kmsMasterKeyId.
*/
public java.lang.String getKmsMasterKeyId() {
java.lang.Object ref = kmsMasterKeyId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kmsMasterKeyId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string kms_master_key_id = 1;
* @return The bytes for kmsMasterKeyId.
*/
public com.google.protobuf.ByteString
getKmsMasterKeyIdBytes() {
java.lang.Object ref = kmsMasterKeyId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
kmsMasterKeyId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string kms_master_key_id = 1;
* @param value The kmsMasterKeyId to set.
* @return This builder for chaining.
*/
public Builder setKmsMasterKeyId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kmsMasterKeyId_ = value;
onChanged();
return this;
}
/**
* string kms_master_key_id = 1;
* @return This builder for chaining.
*/
public Builder clearKmsMasterKeyId() {
kmsMasterKeyId_ = getDefaultInstance().getKmsMasterKeyId();
onChanged();
return this;
}
/**
* string kms_master_key_id = 1;
* @param value The bytes for kmsMasterKeyId to set.
* @return This builder for chaining.
*/
public Builder setKmsMasterKeyIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kmsMasterKeyId_ = value;
onChanged();
return this;
}
private java.lang.Object sseAlgorithm_ = "";
/**
* string sse_algorithm = 2;
* @return The sseAlgorithm.
*/
public java.lang.String getSseAlgorithm() {
java.lang.Object ref = sseAlgorithm_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sseAlgorithm_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string sse_algorithm = 2;
* @return The bytes for sseAlgorithm.
*/
public com.google.protobuf.ByteString
getSseAlgorithmBytes() {
java.lang.Object ref = sseAlgorithm_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sseAlgorithm_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string sse_algorithm = 2;
* @param value The sseAlgorithm to set.
* @return This builder for chaining.
*/
public Builder setSseAlgorithm(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sseAlgorithm_ = value;
onChanged();
return this;
}
/**
* string sse_algorithm = 2;
* @return This builder for chaining.
*/
public Builder clearSseAlgorithm() {
sseAlgorithm_ = getDefaultInstance().getSseAlgorithm();
onChanged();
return this;
}
/**
* string sse_algorithm = 2;
* @param value The bytes for sseAlgorithm to set.
* @return This builder for chaining.
*/
public Builder setSseAlgorithmBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sseAlgorithm_ = 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:yandex.cloud.storage.v1.Encryption.EncryptionRule)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.storage.v1.Encryption.EncryptionRule)
private static final yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule();
}
public static yandex.cloud.api.storage.v1.BucketOuterClass.Encryption.EncryptionRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser