Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate compute client #4399

Merged
merged 1 commit into from
Feb 4, 2019
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
@@ -0,0 +1,204 @@
/*
* 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 FixedOrPercent implements ApiMessage {
private final Integer calculated;
private final Integer fixed;
private final Integer percent;

private FixedOrPercent() {
this.calculated = null;
this.fixed = null;
this.percent = null;
}

private FixedOrPercent(Integer calculated, Integer fixed, Integer percent) {
this.calculated = calculated;
this.fixed = fixed;
this.percent = percent;
}

@Override
public Object getFieldValue(String fieldName) {
if ("calculated".equals(fieldName)) {
return calculated;
}
if ("fixed".equals(fieldName)) {
return fixed;
}
if ("percent".equals(fieldName)) {
return percent;
}
return null;
}

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

@Nullable
@Override
public List<String> getFieldMask() {
return null;
}

public Integer getCalculated() {
return calculated;
}

public Integer getFixed() {
return fixed;
}

public Integer getPercent() {
return percent;
}

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

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

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

public static FixedOrPercent getDefaultInstance() {
return DEFAULT_INSTANCE;
}

private static final FixedOrPercent DEFAULT_INSTANCE;

static {
DEFAULT_INSTANCE = new FixedOrPercent();
}

public static class Builder {
private Integer calculated;
private Integer fixed;
private Integer percent;

Builder() {}

public Builder mergeFrom(FixedOrPercent other) {
if (other == FixedOrPercent.getDefaultInstance()) return this;
if (other.getCalculated() != null) {
this.calculated = other.calculated;
}
if (other.getFixed() != null) {
this.fixed = other.fixed;
}
if (other.getPercent() != null) {
this.percent = other.percent;
}
return this;
}

Builder(FixedOrPercent source) {
this.calculated = source.calculated;
this.fixed = source.fixed;
this.percent = source.percent;
}

public Integer getCalculated() {
return calculated;
}

public Builder setCalculated(Integer calculated) {
this.calculated = calculated;
return this;
}

public Integer getFixed() {
return fixed;
}

public Builder setFixed(Integer fixed) {
this.fixed = fixed;
return this;
}

public Integer getPercent() {
return percent;
}

public Builder setPercent(Integer percent) {
this.percent = percent;
return this;
}

public FixedOrPercent build() {

return new FixedOrPercent(calculated, fixed, percent);
}

public Builder clone() {
Builder newBuilder = new Builder();
newBuilder.setCalculated(this.calculated);
newBuilder.setFixed(this.fixed);
newBuilder.setPercent(this.percent);
return newBuilder;
}
}

@Override
public String toString() {
return "FixedOrPercent{"
+ "calculated="
+ calculated
+ ", "
+ "fixed="
+ fixed
+ ", "
+ "percent="
+ percent
+ "}";
}

@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof FixedOrPercent) {
FixedOrPercent that = (FixedOrPercent) o;
return Objects.equals(this.calculated, that.getCalculated())
&& Objects.equals(this.fixed, that.getFixed())
&& Objects.equals(this.percent, that.getPercent());
}
return false;
}

@Override
public int hashCode() {
return Objects.hash(calculated, fixed, percent);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public final class ForwardingRule implements ApiMessage {
private final List<String> ports;
private final String region;
private final String selfLink;
private final String serviceLabel;
private final String serviceName;
private final String subnetwork;
private final String target;

Expand All @@ -68,6 +70,8 @@ private ForwardingRule() {
this.ports = null;
this.region = null;
this.selfLink = null;
this.serviceLabel = null;
this.serviceName = null;
this.subnetwork = null;
this.target = null;
}
Expand All @@ -89,6 +93,8 @@ private ForwardingRule(
List<String> ports,
String region,
String selfLink,
String serviceLabel,
String serviceName,
String subnetwork,
String target) {
this.backendService = backendService;
Expand All @@ -107,6 +113,8 @@ private ForwardingRule(
this.ports = ports;
this.region = region;
this.selfLink = selfLink;
this.serviceLabel = serviceLabel;
this.serviceName = serviceName;
this.subnetwork = subnetwork;
this.target = target;
}
Expand Down Expand Up @@ -161,6 +169,12 @@ public Object getFieldValue(String fieldName) {
if ("selfLink".equals(fieldName)) {
return selfLink;
}
if ("serviceLabel".equals(fieldName)) {
return serviceLabel;
}
if ("serviceName".equals(fieldName)) {
return serviceName;
}
if ("subnetwork".equals(fieldName)) {
return subnetwork;
}
Expand Down Expand Up @@ -246,6 +260,14 @@ public String getSelfLink() {
return selfLink;
}

public String getServiceLabel() {
return serviceLabel;
}

public String getServiceName() {
return serviceName;
}

public String getSubnetwork() {
return subnetwork;
}
Expand Down Expand Up @@ -293,6 +315,8 @@ public static class Builder {
private List<String> ports;
private String region;
private String selfLink;
private String serviceLabel;
private String serviceName;
private String subnetwork;
private String target;

Expand Down Expand Up @@ -348,6 +372,12 @@ public Builder mergeFrom(ForwardingRule other) {
if (other.getSelfLink() != null) {
this.selfLink = other.selfLink;
}
if (other.getServiceLabel() != null) {
this.serviceLabel = other.serviceLabel;
}
if (other.getServiceName() != null) {
this.serviceName = other.serviceName;
}
if (other.getSubnetwork() != null) {
this.subnetwork = other.subnetwork;
}
Expand All @@ -374,6 +404,8 @@ public Builder mergeFrom(ForwardingRule other) {
this.ports = source.ports;
this.region = source.region;
this.selfLink = source.selfLink;
this.serviceLabel = source.serviceLabel;
this.serviceName = source.serviceName;
this.subnetwork = source.subnetwork;
this.target = source.target;
}
Expand Down Expand Up @@ -533,6 +565,24 @@ public Builder setSelfLink(String selfLink) {
return this;
}

public String getServiceLabel() {
return serviceLabel;
}

public Builder setServiceLabel(String serviceLabel) {
this.serviceLabel = serviceLabel;
return this;
}

public String getServiceName() {
return serviceName;
}

public Builder setServiceName(String serviceName) {
this.serviceName = serviceName;
return this;
}

public String getSubnetwork() {
return subnetwork;
}
Expand Down Expand Up @@ -570,6 +620,8 @@ public ForwardingRule build() {
ports,
region,
selfLink,
serviceLabel,
serviceName,
subnetwork,
target);
}
Expand All @@ -592,6 +644,8 @@ public Builder clone() {
newBuilder.addAllPorts(this.ports);
newBuilder.setRegion(this.region);
newBuilder.setSelfLink(this.selfLink);
newBuilder.setServiceLabel(this.serviceLabel);
newBuilder.setServiceName(this.serviceName);
newBuilder.setSubnetwork(this.subnetwork);
newBuilder.setTarget(this.target);
return newBuilder;
Expand Down Expand Up @@ -649,6 +703,12 @@ public String toString() {
+ "selfLink="
+ selfLink
+ ", "
+ "serviceLabel="
+ serviceLabel
+ ", "
+ "serviceName="
+ serviceName
+ ", "
+ "subnetwork="
+ subnetwork
+ ", "
Expand Down Expand Up @@ -680,6 +740,8 @@ public boolean equals(Object o) {
&& Objects.equals(this.ports, that.getPortsList())
&& Objects.equals(this.region, that.getRegion())
&& Objects.equals(this.selfLink, that.getSelfLink())
&& Objects.equals(this.serviceLabel, that.getServiceLabel())
&& Objects.equals(this.serviceName, that.getServiceName())
&& Objects.equals(this.subnetwork, that.getSubnetwork())
&& Objects.equals(this.target, that.getTarget());
}
Expand All @@ -705,6 +767,8 @@ public int hashCode() {
ports,
region,
selfLink,
serviceLabel,
serviceName,
subnetwork,
target);
}
Expand Down
Loading