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

com.google.api.services.servicecontrol.v2.model.Peer Maven / Gradle / Ivy

/*
 * 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
 *
 * http://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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.servicecontrol.v2.model;

/**
 * This message defines attributes for a node that handles a network request. The node can be either
 * a service or an application that sends, forwards, or receives the request. Service peers should
 * fill in `principal` and `labels` as appropriate.
 *
 * 

This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Service Control API. For a detailed explanation see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

* * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class Peer extends com.google.api.client.json.GenericJson { /** * The IP address of the peer. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String ip; /** * The labels associated with the peer. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map labels; /** * The network port of the peer. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long port; /** * The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer * instead of the request. For example, the identity associated with a load balancer that * forwarded the request. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String principal; /** * The CLDR country/region code associated with the above IP address. If the IP address is * private, the `region_code` should reflect the physical location where this peer is running. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String regionCode; /** * The IP address of the peer. * @return value or {@code null} for none */ public java.lang.String getIp() { return ip; } /** * The IP address of the peer. * @param ip ip or {@code null} for none */ public Peer setIp(java.lang.String ip) { this.ip = ip; return this; } /** * The labels associated with the peer. * @return value or {@code null} for none */ public java.util.Map getLabels() { return labels; } /** * The labels associated with the peer. * @param labels labels or {@code null} for none */ public Peer setLabels(java.util.Map labels) { this.labels = labels; return this; } /** * The network port of the peer. * @return value or {@code null} for none */ public java.lang.Long getPort() { return port; } /** * The network port of the peer. * @param port port or {@code null} for none */ public Peer setPort(java.lang.Long port) { this.port = port; return this; } /** * The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer * instead of the request. For example, the identity associated with a load balancer that * forwarded the request. * @return value or {@code null} for none */ public java.lang.String getPrincipal() { return principal; } /** * The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer * instead of the request. For example, the identity associated with a load balancer that * forwarded the request. * @param principal principal or {@code null} for none */ public Peer setPrincipal(java.lang.String principal) { this.principal = principal; return this; } /** * The CLDR country/region code associated with the above IP address. If the IP address is * private, the `region_code` should reflect the physical location where this peer is running. * @return value or {@code null} for none */ public java.lang.String getRegionCode() { return regionCode; } /** * The CLDR country/region code associated with the above IP address. If the IP address is * private, the `region_code` should reflect the physical location where this peer is running. * @param regionCode regionCode or {@code null} for none */ public Peer setRegionCode(java.lang.String regionCode) { this.regionCode = regionCode; return this; } @Override public Peer set(String fieldName, Object value) { return (Peer) super.set(fieldName, value); } @Override public Peer clone() { return (Peer) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy