All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.netapp.v1.SnapshotPolicy Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/netapp/v1/volume.proto

// Protobuf Java Version: 3.25.4
package com.google.cloud.netapp.v1;

/**
 *
 *
 * 
 * Snapshot Policy for a volume.
 * 
* * Protobuf type {@code google.cloud.netapp.v1.SnapshotPolicy} */ public final class SnapshotPolicy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.SnapshotPolicy) SnapshotPolicyOrBuilder { private static final long serialVersionUID = 0L; // Use SnapshotPolicy.newBuilder() to construct. private SnapshotPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SnapshotPolicy() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SnapshotPolicy(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_SnapshotPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_SnapshotPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.netapp.v1.SnapshotPolicy.class, com.google.cloud.netapp.v1.SnapshotPolicy.Builder.class); } private int bitField0_; public static final int ENABLED_FIELD_NUMBER = 1; private boolean enabled_ = false; /** * * *
   * If enabled, make snapshots automatically according to the schedules.
   * Default is false.
   * 
* * optional bool enabled = 1; * * @return Whether the enabled field is set. */ @java.lang.Override public boolean hasEnabled() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * If enabled, make snapshots automatically according to the schedules.
   * Default is false.
   * 
* * optional bool enabled = 1; * * @return The enabled. */ @java.lang.Override public boolean getEnabled() { return enabled_; } public static final int HOURLY_SCHEDULE_FIELD_NUMBER = 2; private com.google.cloud.netapp.v1.HourlySchedule hourlySchedule_; /** * * *
   * Hourly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; * * @return Whether the hourlySchedule field is set. */ @java.lang.Override public boolean hasHourlySchedule() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Hourly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; * * @return The hourlySchedule. */ @java.lang.Override public com.google.cloud.netapp.v1.HourlySchedule getHourlySchedule() { return hourlySchedule_ == null ? com.google.cloud.netapp.v1.HourlySchedule.getDefaultInstance() : hourlySchedule_; } /** * * *
   * Hourly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; */ @java.lang.Override public com.google.cloud.netapp.v1.HourlyScheduleOrBuilder getHourlyScheduleOrBuilder() { return hourlySchedule_ == null ? com.google.cloud.netapp.v1.HourlySchedule.getDefaultInstance() : hourlySchedule_; } public static final int DAILY_SCHEDULE_FIELD_NUMBER = 3; private com.google.cloud.netapp.v1.DailySchedule dailySchedule_; /** * * *
   * Daily schedule policy.
   * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; * * @return Whether the dailySchedule field is set. */ @java.lang.Override public boolean hasDailySchedule() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Daily schedule policy.
   * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; * * @return The dailySchedule. */ @java.lang.Override public com.google.cloud.netapp.v1.DailySchedule getDailySchedule() { return dailySchedule_ == null ? com.google.cloud.netapp.v1.DailySchedule.getDefaultInstance() : dailySchedule_; } /** * * *
   * Daily schedule policy.
   * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; */ @java.lang.Override public com.google.cloud.netapp.v1.DailyScheduleOrBuilder getDailyScheduleOrBuilder() { return dailySchedule_ == null ? com.google.cloud.netapp.v1.DailySchedule.getDefaultInstance() : dailySchedule_; } public static final int WEEKLY_SCHEDULE_FIELD_NUMBER = 4; private com.google.cloud.netapp.v1.WeeklySchedule weeklySchedule_; /** * * *
   * Weekly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; * * @return Whether the weeklySchedule field is set. */ @java.lang.Override public boolean hasWeeklySchedule() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * Weekly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; * * @return The weeklySchedule. */ @java.lang.Override public com.google.cloud.netapp.v1.WeeklySchedule getWeeklySchedule() { return weeklySchedule_ == null ? com.google.cloud.netapp.v1.WeeklySchedule.getDefaultInstance() : weeklySchedule_; } /** * * *
   * Weekly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; */ @java.lang.Override public com.google.cloud.netapp.v1.WeeklyScheduleOrBuilder getWeeklyScheduleOrBuilder() { return weeklySchedule_ == null ? com.google.cloud.netapp.v1.WeeklySchedule.getDefaultInstance() : weeklySchedule_; } public static final int MONTHLY_SCHEDULE_FIELD_NUMBER = 5; private com.google.cloud.netapp.v1.MonthlySchedule monthlySchedule_; /** * * *
   * Monthly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; * * @return Whether the monthlySchedule field is set. */ @java.lang.Override public boolean hasMonthlySchedule() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
   * Monthly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; * * @return The monthlySchedule. */ @java.lang.Override public com.google.cloud.netapp.v1.MonthlySchedule getMonthlySchedule() { return monthlySchedule_ == null ? com.google.cloud.netapp.v1.MonthlySchedule.getDefaultInstance() : monthlySchedule_; } /** * * *
   * Monthly schedule policy.
   * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; */ @java.lang.Override public com.google.cloud.netapp.v1.MonthlyScheduleOrBuilder getMonthlyScheduleOrBuilder() { return monthlySchedule_ == null ? com.google.cloud.netapp.v1.MonthlySchedule.getDefaultInstance() : monthlySchedule_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(1, enabled_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getHourlySchedule()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(3, getDailySchedule()); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(4, getWeeklySchedule()); } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(5, getMonthlySchedule()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHourlySchedule()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDailySchedule()); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getWeeklySchedule()); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMonthlySchedule()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.netapp.v1.SnapshotPolicy)) { return super.equals(obj); } com.google.cloud.netapp.v1.SnapshotPolicy other = (com.google.cloud.netapp.v1.SnapshotPolicy) obj; if (hasEnabled() != other.hasEnabled()) return false; if (hasEnabled()) { if (getEnabled() != other.getEnabled()) return false; } if (hasHourlySchedule() != other.hasHourlySchedule()) return false; if (hasHourlySchedule()) { if (!getHourlySchedule().equals(other.getHourlySchedule())) return false; } if (hasDailySchedule() != other.hasDailySchedule()) return false; if (hasDailySchedule()) { if (!getDailySchedule().equals(other.getDailySchedule())) return false; } if (hasWeeklySchedule() != other.hasWeeklySchedule()) return false; if (hasWeeklySchedule()) { if (!getWeeklySchedule().equals(other.getWeeklySchedule())) return false; } if (hasMonthlySchedule() != other.hasMonthlySchedule()) return false; if (hasMonthlySchedule()) { if (!getMonthlySchedule().equals(other.getMonthlySchedule())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasEnabled()) { hash = (37 * hash) + ENABLED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); } if (hasHourlySchedule()) { hash = (37 * hash) + HOURLY_SCHEDULE_FIELD_NUMBER; hash = (53 * hash) + getHourlySchedule().hashCode(); } if (hasDailySchedule()) { hash = (37 * hash) + DAILY_SCHEDULE_FIELD_NUMBER; hash = (53 * hash) + getDailySchedule().hashCode(); } if (hasWeeklySchedule()) { hash = (37 * hash) + WEEKLY_SCHEDULE_FIELD_NUMBER; hash = (53 * hash) + getWeeklySchedule().hashCode(); } if (hasMonthlySchedule()) { hash = (37 * hash) + MONTHLY_SCHEDULE_FIELD_NUMBER; hash = (53 * hash) + getMonthlySchedule().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.netapp.v1.SnapshotPolicy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.netapp.v1.SnapshotPolicy 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; } /** * * *
   * Snapshot Policy for a volume.
   * 
* * Protobuf type {@code google.cloud.netapp.v1.SnapshotPolicy} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.SnapshotPolicy) com.google.cloud.netapp.v1.SnapshotPolicyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_SnapshotPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_SnapshotPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.netapp.v1.SnapshotPolicy.class, com.google.cloud.netapp.v1.SnapshotPolicy.Builder.class); } // Construct using com.google.cloud.netapp.v1.SnapshotPolicy.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getHourlyScheduleFieldBuilder(); getDailyScheduleFieldBuilder(); getWeeklyScheduleFieldBuilder(); getMonthlyScheduleFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; enabled_ = false; hourlySchedule_ = null; if (hourlyScheduleBuilder_ != null) { hourlyScheduleBuilder_.dispose(); hourlyScheduleBuilder_ = null; } dailySchedule_ = null; if (dailyScheduleBuilder_ != null) { dailyScheduleBuilder_.dispose(); dailyScheduleBuilder_ = null; } weeklySchedule_ = null; if (weeklyScheduleBuilder_ != null) { weeklyScheduleBuilder_.dispose(); weeklyScheduleBuilder_ = null; } monthlySchedule_ = null; if (monthlyScheduleBuilder_ != null) { monthlyScheduleBuilder_.dispose(); monthlyScheduleBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.netapp.v1.VolumeProto .internal_static_google_cloud_netapp_v1_SnapshotPolicy_descriptor; } @java.lang.Override public com.google.cloud.netapp.v1.SnapshotPolicy getDefaultInstanceForType() { return com.google.cloud.netapp.v1.SnapshotPolicy.getDefaultInstance(); } @java.lang.Override public com.google.cloud.netapp.v1.SnapshotPolicy build() { com.google.cloud.netapp.v1.SnapshotPolicy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.netapp.v1.SnapshotPolicy buildPartial() { com.google.cloud.netapp.v1.SnapshotPolicy result = new com.google.cloud.netapp.v1.SnapshotPolicy(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.netapp.v1.SnapshotPolicy result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.enabled_ = enabled_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.hourlySchedule_ = hourlyScheduleBuilder_ == null ? hourlySchedule_ : hourlyScheduleBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.dailySchedule_ = dailyScheduleBuilder_ == null ? dailySchedule_ : dailyScheduleBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { result.weeklySchedule_ = weeklyScheduleBuilder_ == null ? weeklySchedule_ : weeklyScheduleBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000010) != 0)) { result.monthlySchedule_ = monthlyScheduleBuilder_ == null ? monthlySchedule_ : monthlyScheduleBuilder_.build(); to_bitField0_ |= 0x00000010; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.netapp.v1.SnapshotPolicy) { return mergeFrom((com.google.cloud.netapp.v1.SnapshotPolicy) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.netapp.v1.SnapshotPolicy other) { if (other == com.google.cloud.netapp.v1.SnapshotPolicy.getDefaultInstance()) return this; if (other.hasEnabled()) { setEnabled(other.getEnabled()); } if (other.hasHourlySchedule()) { mergeHourlySchedule(other.getHourlySchedule()); } if (other.hasDailySchedule()) { mergeDailySchedule(other.getDailySchedule()); } if (other.hasWeeklySchedule()) { mergeWeeklySchedule(other.getWeeklySchedule()); } if (other.hasMonthlySchedule()) { mergeMonthlySchedule(other.getMonthlySchedule()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { enabled_ = input.readBool(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage(getHourlyScheduleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage(getDailyScheduleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage(getWeeklyScheduleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage(getMonthlyScheduleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private boolean enabled_; /** * * *
     * If enabled, make snapshots automatically according to the schedules.
     * Default is false.
     * 
* * optional bool enabled = 1; * * @return Whether the enabled field is set. */ @java.lang.Override public boolean hasEnabled() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * If enabled, make snapshots automatically according to the schedules.
     * Default is false.
     * 
* * optional bool enabled = 1; * * @return The enabled. */ @java.lang.Override public boolean getEnabled() { return enabled_; } /** * * *
     * If enabled, make snapshots automatically according to the schedules.
     * Default is false.
     * 
* * optional bool enabled = 1; * * @param value The enabled to set. * @return This builder for chaining. */ public Builder setEnabled(boolean value) { enabled_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * If enabled, make snapshots automatically according to the schedules.
     * Default is false.
     * 
* * optional bool enabled = 1; * * @return This builder for chaining. */ public Builder clearEnabled() { bitField0_ = (bitField0_ & ~0x00000001); enabled_ = false; onChanged(); return this; } private com.google.cloud.netapp.v1.HourlySchedule hourlySchedule_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.HourlySchedule, com.google.cloud.netapp.v1.HourlySchedule.Builder, com.google.cloud.netapp.v1.HourlyScheduleOrBuilder> hourlyScheduleBuilder_; /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; * * @return Whether the hourlySchedule field is set. */ public boolean hasHourlySchedule() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; * * @return The hourlySchedule. */ public com.google.cloud.netapp.v1.HourlySchedule getHourlySchedule() { if (hourlyScheduleBuilder_ == null) { return hourlySchedule_ == null ? com.google.cloud.netapp.v1.HourlySchedule.getDefaultInstance() : hourlySchedule_; } else { return hourlyScheduleBuilder_.getMessage(); } } /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; */ public Builder setHourlySchedule(com.google.cloud.netapp.v1.HourlySchedule value) { if (hourlyScheduleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } hourlySchedule_ = value; } else { hourlyScheduleBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; */ public Builder setHourlySchedule( com.google.cloud.netapp.v1.HourlySchedule.Builder builderForValue) { if (hourlyScheduleBuilder_ == null) { hourlySchedule_ = builderForValue.build(); } else { hourlyScheduleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; */ public Builder mergeHourlySchedule(com.google.cloud.netapp.v1.HourlySchedule value) { if (hourlyScheduleBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && hourlySchedule_ != null && hourlySchedule_ != com.google.cloud.netapp.v1.HourlySchedule.getDefaultInstance()) { getHourlyScheduleBuilder().mergeFrom(value); } else { hourlySchedule_ = value; } } else { hourlyScheduleBuilder_.mergeFrom(value); } if (hourlySchedule_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; */ public Builder clearHourlySchedule() { bitField0_ = (bitField0_ & ~0x00000002); hourlySchedule_ = null; if (hourlyScheduleBuilder_ != null) { hourlyScheduleBuilder_.dispose(); hourlyScheduleBuilder_ = null; } onChanged(); return this; } /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; */ public com.google.cloud.netapp.v1.HourlySchedule.Builder getHourlyScheduleBuilder() { bitField0_ |= 0x00000002; onChanged(); return getHourlyScheduleFieldBuilder().getBuilder(); } /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; */ public com.google.cloud.netapp.v1.HourlyScheduleOrBuilder getHourlyScheduleOrBuilder() { if (hourlyScheduleBuilder_ != null) { return hourlyScheduleBuilder_.getMessageOrBuilder(); } else { return hourlySchedule_ == null ? com.google.cloud.netapp.v1.HourlySchedule.getDefaultInstance() : hourlySchedule_; } } /** * * *
     * Hourly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.HourlySchedule, com.google.cloud.netapp.v1.HourlySchedule.Builder, com.google.cloud.netapp.v1.HourlyScheduleOrBuilder> getHourlyScheduleFieldBuilder() { if (hourlyScheduleBuilder_ == null) { hourlyScheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.HourlySchedule, com.google.cloud.netapp.v1.HourlySchedule.Builder, com.google.cloud.netapp.v1.HourlyScheduleOrBuilder>( getHourlySchedule(), getParentForChildren(), isClean()); hourlySchedule_ = null; } return hourlyScheduleBuilder_; } private com.google.cloud.netapp.v1.DailySchedule dailySchedule_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.DailySchedule, com.google.cloud.netapp.v1.DailySchedule.Builder, com.google.cloud.netapp.v1.DailyScheduleOrBuilder> dailyScheduleBuilder_; /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; * * @return Whether the dailySchedule field is set. */ public boolean hasDailySchedule() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; * * @return The dailySchedule. */ public com.google.cloud.netapp.v1.DailySchedule getDailySchedule() { if (dailyScheduleBuilder_ == null) { return dailySchedule_ == null ? com.google.cloud.netapp.v1.DailySchedule.getDefaultInstance() : dailySchedule_; } else { return dailyScheduleBuilder_.getMessage(); } } /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; */ public Builder setDailySchedule(com.google.cloud.netapp.v1.DailySchedule value) { if (dailyScheduleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } dailySchedule_ = value; } else { dailyScheduleBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; */ public Builder setDailySchedule( com.google.cloud.netapp.v1.DailySchedule.Builder builderForValue) { if (dailyScheduleBuilder_ == null) { dailySchedule_ = builderForValue.build(); } else { dailyScheduleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; */ public Builder mergeDailySchedule(com.google.cloud.netapp.v1.DailySchedule value) { if (dailyScheduleBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && dailySchedule_ != null && dailySchedule_ != com.google.cloud.netapp.v1.DailySchedule.getDefaultInstance()) { getDailyScheduleBuilder().mergeFrom(value); } else { dailySchedule_ = value; } } else { dailyScheduleBuilder_.mergeFrom(value); } if (dailySchedule_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; */ public Builder clearDailySchedule() { bitField0_ = (bitField0_ & ~0x00000004); dailySchedule_ = null; if (dailyScheduleBuilder_ != null) { dailyScheduleBuilder_.dispose(); dailyScheduleBuilder_ = null; } onChanged(); return this; } /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; */ public com.google.cloud.netapp.v1.DailySchedule.Builder getDailyScheduleBuilder() { bitField0_ |= 0x00000004; onChanged(); return getDailyScheduleFieldBuilder().getBuilder(); } /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; */ public com.google.cloud.netapp.v1.DailyScheduleOrBuilder getDailyScheduleOrBuilder() { if (dailyScheduleBuilder_ != null) { return dailyScheduleBuilder_.getMessageOrBuilder(); } else { return dailySchedule_ == null ? com.google.cloud.netapp.v1.DailySchedule.getDefaultInstance() : dailySchedule_; } } /** * * *
     * Daily schedule policy.
     * 
* * optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.DailySchedule, com.google.cloud.netapp.v1.DailySchedule.Builder, com.google.cloud.netapp.v1.DailyScheduleOrBuilder> getDailyScheduleFieldBuilder() { if (dailyScheduleBuilder_ == null) { dailyScheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.DailySchedule, com.google.cloud.netapp.v1.DailySchedule.Builder, com.google.cloud.netapp.v1.DailyScheduleOrBuilder>( getDailySchedule(), getParentForChildren(), isClean()); dailySchedule_ = null; } return dailyScheduleBuilder_; } private com.google.cloud.netapp.v1.WeeklySchedule weeklySchedule_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.WeeklySchedule, com.google.cloud.netapp.v1.WeeklySchedule.Builder, com.google.cloud.netapp.v1.WeeklyScheduleOrBuilder> weeklyScheduleBuilder_; /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; * * @return Whether the weeklySchedule field is set. */ public boolean hasWeeklySchedule() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; * * @return The weeklySchedule. */ public com.google.cloud.netapp.v1.WeeklySchedule getWeeklySchedule() { if (weeklyScheduleBuilder_ == null) { return weeklySchedule_ == null ? com.google.cloud.netapp.v1.WeeklySchedule.getDefaultInstance() : weeklySchedule_; } else { return weeklyScheduleBuilder_.getMessage(); } } /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; */ public Builder setWeeklySchedule(com.google.cloud.netapp.v1.WeeklySchedule value) { if (weeklyScheduleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } weeklySchedule_ = value; } else { weeklyScheduleBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; */ public Builder setWeeklySchedule( com.google.cloud.netapp.v1.WeeklySchedule.Builder builderForValue) { if (weeklyScheduleBuilder_ == null) { weeklySchedule_ = builderForValue.build(); } else { weeklyScheduleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; */ public Builder mergeWeeklySchedule(com.google.cloud.netapp.v1.WeeklySchedule value) { if (weeklyScheduleBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && weeklySchedule_ != null && weeklySchedule_ != com.google.cloud.netapp.v1.WeeklySchedule.getDefaultInstance()) { getWeeklyScheduleBuilder().mergeFrom(value); } else { weeklySchedule_ = value; } } else { weeklyScheduleBuilder_.mergeFrom(value); } if (weeklySchedule_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; */ public Builder clearWeeklySchedule() { bitField0_ = (bitField0_ & ~0x00000008); weeklySchedule_ = null; if (weeklyScheduleBuilder_ != null) { weeklyScheduleBuilder_.dispose(); weeklyScheduleBuilder_ = null; } onChanged(); return this; } /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; */ public com.google.cloud.netapp.v1.WeeklySchedule.Builder getWeeklyScheduleBuilder() { bitField0_ |= 0x00000008; onChanged(); return getWeeklyScheduleFieldBuilder().getBuilder(); } /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; */ public com.google.cloud.netapp.v1.WeeklyScheduleOrBuilder getWeeklyScheduleOrBuilder() { if (weeklyScheduleBuilder_ != null) { return weeklyScheduleBuilder_.getMessageOrBuilder(); } else { return weeklySchedule_ == null ? com.google.cloud.netapp.v1.WeeklySchedule.getDefaultInstance() : weeklySchedule_; } } /** * * *
     * Weekly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.WeeklySchedule, com.google.cloud.netapp.v1.WeeklySchedule.Builder, com.google.cloud.netapp.v1.WeeklyScheduleOrBuilder> getWeeklyScheduleFieldBuilder() { if (weeklyScheduleBuilder_ == null) { weeklyScheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.WeeklySchedule, com.google.cloud.netapp.v1.WeeklySchedule.Builder, com.google.cloud.netapp.v1.WeeklyScheduleOrBuilder>( getWeeklySchedule(), getParentForChildren(), isClean()); weeklySchedule_ = null; } return weeklyScheduleBuilder_; } private com.google.cloud.netapp.v1.MonthlySchedule monthlySchedule_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.MonthlySchedule, com.google.cloud.netapp.v1.MonthlySchedule.Builder, com.google.cloud.netapp.v1.MonthlyScheduleOrBuilder> monthlyScheduleBuilder_; /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; * * @return Whether the monthlySchedule field is set. */ public boolean hasMonthlySchedule() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; * * @return The monthlySchedule. */ public com.google.cloud.netapp.v1.MonthlySchedule getMonthlySchedule() { if (monthlyScheduleBuilder_ == null) { return monthlySchedule_ == null ? com.google.cloud.netapp.v1.MonthlySchedule.getDefaultInstance() : monthlySchedule_; } else { return monthlyScheduleBuilder_.getMessage(); } } /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; */ public Builder setMonthlySchedule(com.google.cloud.netapp.v1.MonthlySchedule value) { if (monthlyScheduleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } monthlySchedule_ = value; } else { monthlyScheduleBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; */ public Builder setMonthlySchedule( com.google.cloud.netapp.v1.MonthlySchedule.Builder builderForValue) { if (monthlyScheduleBuilder_ == null) { monthlySchedule_ = builderForValue.build(); } else { monthlyScheduleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; */ public Builder mergeMonthlySchedule(com.google.cloud.netapp.v1.MonthlySchedule value) { if (monthlyScheduleBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && monthlySchedule_ != null && monthlySchedule_ != com.google.cloud.netapp.v1.MonthlySchedule.getDefaultInstance()) { getMonthlyScheduleBuilder().mergeFrom(value); } else { monthlySchedule_ = value; } } else { monthlyScheduleBuilder_.mergeFrom(value); } if (monthlySchedule_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; */ public Builder clearMonthlySchedule() { bitField0_ = (bitField0_ & ~0x00000010); monthlySchedule_ = null; if (monthlyScheduleBuilder_ != null) { monthlyScheduleBuilder_.dispose(); monthlyScheduleBuilder_ = null; } onChanged(); return this; } /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; */ public com.google.cloud.netapp.v1.MonthlySchedule.Builder getMonthlyScheduleBuilder() { bitField0_ |= 0x00000010; onChanged(); return getMonthlyScheduleFieldBuilder().getBuilder(); } /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; */ public com.google.cloud.netapp.v1.MonthlyScheduleOrBuilder getMonthlyScheduleOrBuilder() { if (monthlyScheduleBuilder_ != null) { return monthlyScheduleBuilder_.getMessageOrBuilder(); } else { return monthlySchedule_ == null ? com.google.cloud.netapp.v1.MonthlySchedule.getDefaultInstance() : monthlySchedule_; } } /** * * *
     * Monthly schedule policy.
     * 
* * optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.MonthlySchedule, com.google.cloud.netapp.v1.MonthlySchedule.Builder, com.google.cloud.netapp.v1.MonthlyScheduleOrBuilder> getMonthlyScheduleFieldBuilder() { if (monthlyScheduleBuilder_ == null) { monthlyScheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.netapp.v1.MonthlySchedule, com.google.cloud.netapp.v1.MonthlySchedule.Builder, com.google.cloud.netapp.v1.MonthlyScheduleOrBuilder>( getMonthlySchedule(), getParentForChildren(), isClean()); monthlySchedule_ = null; } return monthlyScheduleBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.SnapshotPolicy) } // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.SnapshotPolicy) private static final com.google.cloud.netapp.v1.SnapshotPolicy DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.SnapshotPolicy(); } public static com.google.cloud.netapp.v1.SnapshotPolicy getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SnapshotPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.netapp.v1.SnapshotPolicy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy