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

com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest 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/assuredworkloads/v1beta1/assuredworkloads.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.assuredworkloads.v1beta1;

/**
 *
 *
 * 
 * A request to analyze a hypothetical move of a source project or project-based
 * workload to a target (destination) folder-based workload.
 * 
* * Protobuf type {@code google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest} */ public final class AnalyzeWorkloadMoveRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest) AnalyzeWorkloadMoveRequestOrBuilder { private static final long serialVersionUID = 0L; // Use AnalyzeWorkloadMoveRequest.newBuilder() to construct. private AnalyzeWorkloadMoveRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AnalyzeWorkloadMoveRequest() { target_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AnalyzeWorkloadMoveRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.assuredworkloads.v1beta1.AssuredworkloadsProto .internal_static_google_cloud_assuredworkloads_v1beta1_AnalyzeWorkloadMoveRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.assuredworkloads.v1beta1.AssuredworkloadsProto .internal_static_google_cloud_assuredworkloads_v1beta1_AnalyzeWorkloadMoveRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest.class, com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest.Builder.class); } private int projectOrWorkloadResourceCase_ = 0; @SuppressWarnings("serial") private java.lang.Object projectOrWorkloadResource_; public enum ProjectOrWorkloadResourceCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { SOURCE(1), PROJECT(3), PROJECTORWORKLOADRESOURCE_NOT_SET(0); private final int value; private ProjectOrWorkloadResourceCase(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 ProjectOrWorkloadResourceCase valueOf(int value) { return forNumber(value); } public static ProjectOrWorkloadResourceCase forNumber(int value) { switch (value) { case 1: return SOURCE; case 3: return PROJECT; case 0: return PROJECTORWORKLOADRESOURCE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ProjectOrWorkloadResourceCase getProjectOrWorkloadResourceCase() { return ProjectOrWorkloadResourceCase.forNumber(projectOrWorkloadResourceCase_); } public static final int SOURCE_FIELD_NUMBER = 1; /** * * *
   * The source type is a project-based workload. Specify the workloads's
   * relative resource name, formatted as:
   * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
   * For example:
   * "organizations/123/locations/us-east1/workloads/assured-workload-1"
   * 
* * string source = 1; * * @return Whether the source field is set. */ public boolean hasSource() { return projectOrWorkloadResourceCase_ == 1; } /** * * *
   * The source type is a project-based workload. Specify the workloads's
   * relative resource name, formatted as:
   * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
   * For example:
   * "organizations/123/locations/us-east1/workloads/assured-workload-1"
   * 
* * string source = 1; * * @return The source. */ public java.lang.String getSource() { java.lang.Object ref = ""; if (projectOrWorkloadResourceCase_ == 1) { ref = projectOrWorkloadResource_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (projectOrWorkloadResourceCase_ == 1) { projectOrWorkloadResource_ = s; } return s; } } /** * * *
   * The source type is a project-based workload. Specify the workloads's
   * relative resource name, formatted as:
   * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
   * For example:
   * "organizations/123/locations/us-east1/workloads/assured-workload-1"
   * 
* * string source = 1; * * @return The bytes for source. */ public com.google.protobuf.ByteString getSourceBytes() { java.lang.Object ref = ""; if (projectOrWorkloadResourceCase_ == 1) { ref = projectOrWorkloadResource_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (projectOrWorkloadResourceCase_ == 1) { projectOrWorkloadResource_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PROJECT_FIELD_NUMBER = 3; /** * * *
   * The source type is a project. Specify the project's relative resource
   * name, formatted as either a project number or a project ID:
   * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
   * For example:
   * "projects/951040570662" when specifying a project number, or
   * "projects/my-project-123" when specifying a project ID.
   * 
* * string project = 3; * * @return Whether the project field is set. */ public boolean hasProject() { return projectOrWorkloadResourceCase_ == 3; } /** * * *
   * The source type is a project. Specify the project's relative resource
   * name, formatted as either a project number or a project ID:
   * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
   * For example:
   * "projects/951040570662" when specifying a project number, or
   * "projects/my-project-123" when specifying a project ID.
   * 
* * string project = 3; * * @return The project. */ public java.lang.String getProject() { java.lang.Object ref = ""; if (projectOrWorkloadResourceCase_ == 3) { ref = projectOrWorkloadResource_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (projectOrWorkloadResourceCase_ == 3) { projectOrWorkloadResource_ = s; } return s; } } /** * * *
   * The source type is a project. Specify the project's relative resource
   * name, formatted as either a project number or a project ID:
   * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
   * For example:
   * "projects/951040570662" when specifying a project number, or
   * "projects/my-project-123" when specifying a project ID.
   * 
* * string project = 3; * * @return The bytes for project. */ public com.google.protobuf.ByteString getProjectBytes() { java.lang.Object ref = ""; if (projectOrWorkloadResourceCase_ == 3) { ref = projectOrWorkloadResource_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (projectOrWorkloadResourceCase_ == 3) { projectOrWorkloadResource_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TARGET_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object target_ = ""; /** * * *
   * Required. The resource ID of the folder-based destination workload. This workload is
   * where the source project will hypothetically be moved to. Specify the
   * workload's relative resource name, formatted as:
   * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
   * For example:
   * "organizations/123/locations/us-east1/workloads/assured-workload-2"
   * 
* * string target = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The target. */ @java.lang.Override public java.lang.String getTarget() { java.lang.Object ref = target_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); target_ = s; return s; } } /** * * *
   * Required. The resource ID of the folder-based destination workload. This workload is
   * where the source project will hypothetically be moved to. Specify the
   * workload's relative resource name, formatted as:
   * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
   * For example:
   * "organizations/123/locations/us-east1/workloads/assured-workload-2"
   * 
* * string target = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for target. */ @java.lang.Override public com.google.protobuf.ByteString getTargetBytes() { java.lang.Object ref = target_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); target_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (projectOrWorkloadResourceCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectOrWorkloadResource_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, target_); } if (projectOrWorkloadResourceCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, projectOrWorkloadResource_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (projectOrWorkloadResourceCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectOrWorkloadResource_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, target_); } if (projectOrWorkloadResourceCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, projectOrWorkloadResource_); } 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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest)) { return super.equals(obj); } com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest other = (com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest) obj; if (!getTarget().equals(other.getTarget())) return false; if (!getProjectOrWorkloadResourceCase().equals(other.getProjectOrWorkloadResourceCase())) return false; switch (projectOrWorkloadResourceCase_) { case 1: if (!getSource().equals(other.getSource())) return false; break; case 3: if (!getProject().equals(other.getProject())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TARGET_FIELD_NUMBER; hash = (53 * hash) + getTarget().hashCode(); switch (projectOrWorkloadResourceCase_) { case 1: hash = (37 * hash) + SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSource().hashCode(); break; case 3: hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest 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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest 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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest 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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest 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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest 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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest 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 request to analyze a hypothetical move of a source project or project-based
   * workload to a target (destination) folder-based workload.
   * 
* * Protobuf type {@code google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest) com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.assuredworkloads.v1beta1.AssuredworkloadsProto .internal_static_google_cloud_assuredworkloads_v1beta1_AnalyzeWorkloadMoveRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.assuredworkloads.v1beta1.AssuredworkloadsProto .internal_static_google_cloud_assuredworkloads_v1beta1_AnalyzeWorkloadMoveRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest.class, com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest.Builder.class); } // Construct using // com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; target_ = ""; projectOrWorkloadResourceCase_ = 0; projectOrWorkloadResource_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.assuredworkloads.v1beta1.AssuredworkloadsProto .internal_static_google_cloud_assuredworkloads_v1beta1_AnalyzeWorkloadMoveRequest_descriptor; } @java.lang.Override public com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest getDefaultInstanceForType() { return com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest .getDefaultInstance(); } @java.lang.Override public com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest build() { com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest buildPartial() { com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest result = new com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000004) != 0)) { result.target_ = target_; } } private void buildPartialOneofs( com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest result) { result.projectOrWorkloadResourceCase_ = projectOrWorkloadResourceCase_; result.projectOrWorkloadResource_ = this.projectOrWorkloadResource_; } @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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest) { return mergeFrom( (com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest other) { if (other == com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest .getDefaultInstance()) return this; if (!other.getTarget().isEmpty()) { target_ = other.target_; bitField0_ |= 0x00000004; onChanged(); } switch (other.getProjectOrWorkloadResourceCase()) { case SOURCE: { projectOrWorkloadResourceCase_ = 1; projectOrWorkloadResource_ = other.projectOrWorkloadResource_; onChanged(); break; } case PROJECT: { projectOrWorkloadResourceCase_ = 3; projectOrWorkloadResource_ = other.projectOrWorkloadResource_; onChanged(); break; } case PROJECTORWORKLOADRESOURCE_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); projectOrWorkloadResourceCase_ = 1; projectOrWorkloadResource_ = s; break; } // case 10 case 18: { target_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); projectOrWorkloadResourceCase_ = 3; projectOrWorkloadResource_ = s; break; } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int projectOrWorkloadResourceCase_ = 0; private java.lang.Object projectOrWorkloadResource_; public ProjectOrWorkloadResourceCase getProjectOrWorkloadResourceCase() { return ProjectOrWorkloadResourceCase.forNumber(projectOrWorkloadResourceCase_); } public Builder clearProjectOrWorkloadResource() { projectOrWorkloadResourceCase_ = 0; projectOrWorkloadResource_ = null; onChanged(); return this; } private int bitField0_; /** * * *
     * The source type is a project-based workload. Specify the workloads's
     * relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-1"
     * 
* * string source = 1; * * @return Whether the source field is set. */ @java.lang.Override public boolean hasSource() { return projectOrWorkloadResourceCase_ == 1; } /** * * *
     * The source type is a project-based workload. Specify the workloads's
     * relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-1"
     * 
* * string source = 1; * * @return The source. */ @java.lang.Override public java.lang.String getSource() { java.lang.Object ref = ""; if (projectOrWorkloadResourceCase_ == 1) { ref = projectOrWorkloadResource_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (projectOrWorkloadResourceCase_ == 1) { projectOrWorkloadResource_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
     * The source type is a project-based workload. Specify the workloads's
     * relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-1"
     * 
* * string source = 1; * * @return The bytes for source. */ @java.lang.Override public com.google.protobuf.ByteString getSourceBytes() { java.lang.Object ref = ""; if (projectOrWorkloadResourceCase_ == 1) { ref = projectOrWorkloadResource_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (projectOrWorkloadResourceCase_ == 1) { projectOrWorkloadResource_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The source type is a project-based workload. Specify the workloads's
     * relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-1"
     * 
* * string source = 1; * * @param value The source to set. * @return This builder for chaining. */ public Builder setSource(java.lang.String value) { if (value == null) { throw new NullPointerException(); } projectOrWorkloadResourceCase_ = 1; projectOrWorkloadResource_ = value; onChanged(); return this; } /** * * *
     * The source type is a project-based workload. Specify the workloads's
     * relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-1"
     * 
* * string source = 1; * * @return This builder for chaining. */ public Builder clearSource() { if (projectOrWorkloadResourceCase_ == 1) { projectOrWorkloadResourceCase_ = 0; projectOrWorkloadResource_ = null; onChanged(); } return this; } /** * * *
     * The source type is a project-based workload. Specify the workloads's
     * relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-1"
     * 
* * string source = 1; * * @param value The bytes for source to set. * @return This builder for chaining. */ public Builder setSourceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); projectOrWorkloadResourceCase_ = 1; projectOrWorkloadResource_ = value; onChanged(); return this; } /** * * *
     * The source type is a project. Specify the project's relative resource
     * name, formatted as either a project number or a project ID:
     * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
     * For example:
     * "projects/951040570662" when specifying a project number, or
     * "projects/my-project-123" when specifying a project ID.
     * 
* * string project = 3; * * @return Whether the project field is set. */ @java.lang.Override public boolean hasProject() { return projectOrWorkloadResourceCase_ == 3; } /** * * *
     * The source type is a project. Specify the project's relative resource
     * name, formatted as either a project number or a project ID:
     * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
     * For example:
     * "projects/951040570662" when specifying a project number, or
     * "projects/my-project-123" when specifying a project ID.
     * 
* * string project = 3; * * @return The project. */ @java.lang.Override public java.lang.String getProject() { java.lang.Object ref = ""; if (projectOrWorkloadResourceCase_ == 3) { ref = projectOrWorkloadResource_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (projectOrWorkloadResourceCase_ == 3) { projectOrWorkloadResource_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
     * The source type is a project. Specify the project's relative resource
     * name, formatted as either a project number or a project ID:
     * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
     * For example:
     * "projects/951040570662" when specifying a project number, or
     * "projects/my-project-123" when specifying a project ID.
     * 
* * string project = 3; * * @return The bytes for project. */ @java.lang.Override public com.google.protobuf.ByteString getProjectBytes() { java.lang.Object ref = ""; if (projectOrWorkloadResourceCase_ == 3) { ref = projectOrWorkloadResource_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (projectOrWorkloadResourceCase_ == 3) { projectOrWorkloadResource_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The source type is a project. Specify the project's relative resource
     * name, formatted as either a project number or a project ID:
     * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
     * For example:
     * "projects/951040570662" when specifying a project number, or
     * "projects/my-project-123" when specifying a project ID.
     * 
* * string project = 3; * * @param value The project to set. * @return This builder for chaining. */ public Builder setProject(java.lang.String value) { if (value == null) { throw new NullPointerException(); } projectOrWorkloadResourceCase_ = 3; projectOrWorkloadResource_ = value; onChanged(); return this; } /** * * *
     * The source type is a project. Specify the project's relative resource
     * name, formatted as either a project number or a project ID:
     * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
     * For example:
     * "projects/951040570662" when specifying a project number, or
     * "projects/my-project-123" when specifying a project ID.
     * 
* * string project = 3; * * @return This builder for chaining. */ public Builder clearProject() { if (projectOrWorkloadResourceCase_ == 3) { projectOrWorkloadResourceCase_ = 0; projectOrWorkloadResource_ = null; onChanged(); } return this; } /** * * *
     * The source type is a project. Specify the project's relative resource
     * name, formatted as either a project number or a project ID:
     * "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
     * For example:
     * "projects/951040570662" when specifying a project number, or
     * "projects/my-project-123" when specifying a project ID.
     * 
* * string project = 3; * * @param value The bytes for project to set. * @return This builder for chaining. */ public Builder setProjectBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); projectOrWorkloadResourceCase_ = 3; projectOrWorkloadResource_ = value; onChanged(); return this; } private java.lang.Object target_ = ""; /** * * *
     * Required. The resource ID of the folder-based destination workload. This workload is
     * where the source project will hypothetically be moved to. Specify the
     * workload's relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-2"
     * 
* * string target = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The target. */ public java.lang.String getTarget() { java.lang.Object ref = target_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); target_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Required. The resource ID of the folder-based destination workload. This workload is
     * where the source project will hypothetically be moved to. Specify the
     * workload's relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-2"
     * 
* * string target = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for target. */ public com.google.protobuf.ByteString getTargetBytes() { java.lang.Object ref = target_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); target_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Required. The resource ID of the folder-based destination workload. This workload is
     * where the source project will hypothetically be moved to. Specify the
     * workload's relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-2"
     * 
* * string target = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The target to set. * @return This builder for chaining. */ public Builder setTarget(java.lang.String value) { if (value == null) { throw new NullPointerException(); } target_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Required. The resource ID of the folder-based destination workload. This workload is
     * where the source project will hypothetically be moved to. Specify the
     * workload's relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-2"
     * 
* * string target = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearTarget() { target_ = getDefaultInstance().getTarget(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * Required. The resource ID of the folder-based destination workload. This workload is
     * where the source project will hypothetically be moved to. Specify the
     * workload's relative resource name, formatted as:
     * "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
     * For example:
     * "organizations/123/locations/us-east1/workloads/assured-workload-2"
     * 
* * string target = 2 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for target to set. * @return This builder for chaining. */ public Builder setTargetBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); target_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } @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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest) } // @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest) private static final com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest(); } public static com.google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AnalyzeWorkloadMoveRequest 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.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy