Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances(

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Performs a reset on the instance. This is a hard reset; the VM does not do a graceful shutdown.
* Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown.
* For more information, see Resetting an instance.
*
* <p>Sample code:
Expand All @@ -1637,7 +1637,7 @@ public final Operation resetInstance(ProjectZoneInstanceName instance) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Performs a reset on the instance. This is a hard reset; the VM does not do a graceful shutdown.
* Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown.
* For more information, see Resetting an instance.
*
* <p>Sample code:
Expand All @@ -1662,7 +1662,7 @@ public final Operation resetInstance(String instance) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Performs a reset on the instance. This is a hard reset; the VM does not do a graceful shutdown.
* Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown.
* For more information, see Resetting an instance.
*
* <p>Sample code:
Expand All @@ -1687,7 +1687,7 @@ public final Operation resetInstance(ResetInstanceHttpRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Performs a reset on the instance. This is a hard reset; the VM does not do a graceful shutdown.
* Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown.
* For more information, see Resetting an instance.
*
* <p>Sample code:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public String getGoogleIpAddress() {
}

/**
* [Output Only] Google reference ID; to be used when raising support tickets with Google or
* [Output Only] Google reference ID to be used when raising support tickets with Google or
* otherwise to debug backend connectivity issues.
*/
public String getGoogleReferenceId() {
Expand Down Expand Up @@ -646,15 +646,15 @@ public Builder setGoogleIpAddress(String googleIpAddress) {
}

/**
* [Output Only] Google reference ID; to be used when raising support tickets with Google or
* [Output Only] Google reference ID to be used when raising support tickets with Google or
* otherwise to debug backend connectivity issues.
*/
public String getGoogleReferenceId() {
return googleReferenceId;
}

/**
* [Output Only] Google reference ID; to be used when raising support tickets with Google or
* [Output Only] Google reference ID to be used when raising support tickets with Google or
* otherwise to debug backend connectivity issues.
*/
public Builder setGoogleReferenceId(String googleReferenceId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,30 @@ public final class ManagedInstance implements ApiMessage {
private final String instance;
private final String instanceStatus;
private final ManagedInstanceLastAttempt lastAttempt;
private final ManagedInstanceVersion version;

private ManagedInstance() {
this.currentAction = null;
this.id = null;
this.instance = null;
this.instanceStatus = null;
this.lastAttempt = null;
this.version = null;
}

private ManagedInstance(
String currentAction,
String id,
String instance,
String instanceStatus,
ManagedInstanceLastAttempt lastAttempt) {
ManagedInstanceLastAttempt lastAttempt,
ManagedInstanceVersion version) {
this.currentAction = currentAction;
this.id = id;
this.instance = instance;
this.instanceStatus = instanceStatus;
this.lastAttempt = lastAttempt;
this.version = version;
}

@Override
Expand All @@ -70,6 +74,9 @@ public Object getFieldValue(String fieldName) {
if ("lastAttempt".equals(fieldName)) {
return lastAttempt;
}
if ("version".equals(fieldName)) {
return version;
}
return null;
}

Expand Down Expand Up @@ -140,6 +147,11 @@ public ManagedInstanceLastAttempt getLastAttempt() {
return lastAttempt;
}

/** [Output Only] Intended version of this instance. */
public ManagedInstanceVersion getVersion() {
return version;
}

public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
Expand Down Expand Up @@ -168,6 +180,7 @@ public static class Builder {
private String instance;
private String instanceStatus;
private ManagedInstanceLastAttempt lastAttempt;
private ManagedInstanceVersion version;

Builder() {}

Expand All @@ -188,6 +201,9 @@ public Builder mergeFrom(ManagedInstance other) {
if (other.getLastAttempt() != null) {
this.lastAttempt = other.lastAttempt;
}
if (other.getVersion() != null) {
this.version = other.version;
}
return this;
}

Expand All @@ -197,6 +213,7 @@ public Builder mergeFrom(ManagedInstance other) {
this.instance = source.instance;
this.instanceStatus = source.instanceStatus;
this.lastAttempt = source.lastAttempt;
this.version = source.version;
}

/**
Expand Down Expand Up @@ -304,9 +321,20 @@ public Builder setLastAttempt(ManagedInstanceLastAttempt lastAttempt) {
return this;
}

/** [Output Only] Intended version of this instance. */
public ManagedInstanceVersion getVersion() {
return version;
}

/** [Output Only] Intended version of this instance. */
public Builder setVersion(ManagedInstanceVersion version) {
this.version = version;
return this;
}

public ManagedInstance build() {

return new ManagedInstance(currentAction, id, instance, instanceStatus, lastAttempt);
return new ManagedInstance(currentAction, id, instance, instanceStatus, lastAttempt, version);
}

public Builder clone() {
Expand All @@ -316,6 +344,7 @@ public Builder clone() {
newBuilder.setInstance(this.instance);
newBuilder.setInstanceStatus(this.instanceStatus);
newBuilder.setLastAttempt(this.lastAttempt);
newBuilder.setVersion(this.version);
return newBuilder;
}
}
Expand All @@ -337,6 +366,9 @@ public String toString() {
+ ", "
+ "lastAttempt="
+ lastAttempt
+ ", "
+ "version="
+ version
+ "}";
}

Expand All @@ -351,13 +383,14 @@ public boolean equals(Object o) {
&& Objects.equals(this.id, that.getId())
&& Objects.equals(this.instance, that.getInstance())
&& Objects.equals(this.instanceStatus, that.getInstanceStatus())
&& Objects.equals(this.lastAttempt, that.getLastAttempt());
&& Objects.equals(this.lastAttempt, that.getLastAttempt())
&& Objects.equals(this.version, that.getVersion());
}
return false;
}

@Override
public int hashCode() {
return Objects.hash(currentAction, id, instance, instanceStatus, lastAttempt);
return Objects.hash(currentAction, id, instance, instanceStatus, lastAttempt, version);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
/*
* Copyright 2019 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.
*/
package com.google.cloud.compute.v1;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.ApiMessage;
import java.util.List;
import java.util.Objects;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("by GAPIC")
@BetaApi
public final class ManagedInstanceVersion implements ApiMessage {
private final String instanceTemplate;
private final String name;

private ManagedInstanceVersion() {
this.instanceTemplate = null;
this.name = null;
}

private ManagedInstanceVersion(String instanceTemplate, String name) {
this.instanceTemplate = instanceTemplate;
this.name = name;
}

@Override
public Object getFieldValue(String fieldName) {
if ("instanceTemplate".equals(fieldName)) {
return instanceTemplate;
}
if ("name".equals(fieldName)) {
return name;
}
return null;
}

@Nullable
@Override
public ApiMessage getApiMessageRequestBody() {
return null;
}

@Nullable
@Override
/**
* The fields that should be serialized (even if they have empty values). If the containing
* message object has a non-null fieldmask, then all the fields in the field mask (and only those
* fields in the field mask) will be serialized. If the containing object does not have a
* fieldmask, then only non-empty fields will be serialized.
*/
public List<String> getFieldMask() {
return null;
}

/**
* [Output Only] The intended template of the instance. This field is empty when current_action is
* one of { DELETING, ABANDONING }.
*/
public String getInstanceTemplate() {
return instanceTemplate;
}

/** [Output Only] Name of the version. */
public String getName() {
return name;
}

public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}

public static Builder newBuilder(ManagedInstanceVersion prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}

public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}

public static ManagedInstanceVersion getDefaultInstance() {
return DEFAULT_INSTANCE;
}

private static final ManagedInstanceVersion DEFAULT_INSTANCE;

static {
DEFAULT_INSTANCE = new ManagedInstanceVersion();
}

public static class Builder {
private String instanceTemplate;
private String name;

Builder() {}

public Builder mergeFrom(ManagedInstanceVersion other) {
if (other == ManagedInstanceVersion.getDefaultInstance()) return this;
if (other.getInstanceTemplate() != null) {
this.instanceTemplate = other.instanceTemplate;
}
if (other.getName() != null) {
this.name = other.name;
}
return this;
}

Builder(ManagedInstanceVersion source) {
this.instanceTemplate = source.instanceTemplate;
this.name = source.name;
}

/**
* [Output Only] The intended template of the instance. This field is empty when current_action
* is one of { DELETING, ABANDONING }.
*/
public String getInstanceTemplate() {
return instanceTemplate;
}

/**
* [Output Only] The intended template of the instance. This field is empty when current_action
* is one of { DELETING, ABANDONING }.
*/
public Builder setInstanceTemplate(String instanceTemplate) {
this.instanceTemplate = instanceTemplate;
return this;
}

/** [Output Only] Name of the version. */
public String getName() {
return name;
}

/** [Output Only] Name of the version. */
public Builder setName(String name) {
this.name = name;
return this;
}

public ManagedInstanceVersion build() {

return new ManagedInstanceVersion(instanceTemplate, name);
}

public Builder clone() {
Builder newBuilder = new Builder();
newBuilder.setInstanceTemplate(this.instanceTemplate);
newBuilder.setName(this.name);
return newBuilder;
}
}

@Override
public String toString() {
return "ManagedInstanceVersion{"
+ "instanceTemplate="
+ instanceTemplate
+ ", "
+ "name="
+ name
+ "}";
}

@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ManagedInstanceVersion) {
ManagedInstanceVersion that = (ManagedInstanceVersion) o;
return Objects.equals(this.instanceTemplate, that.getInstanceTemplate())
&& Objects.equals(this.name, that.getName());
}
return false;
}

@Override
public int hashCode() {
return Objects.hash(instanceTemplate, name);
}
}
Loading