
com.google.api.services.pubsub.model.Label Maven / Gradle / Ivy
/*
* Copyright 2010 Google Inc.
*
* 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/google/apis-client-generator/
* (build: 2018-05-04 17:28:03 UTC)
* on 2018-08-28 at 07:24:20 UTC
* Modify at your own risk.
*/
package com.google.api.services.pubsub.model;
/**
* A key-value pair applied to a given object.
*
* 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 Cloud Pub/Sub 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 Label extends com.google.api.client.json.GenericJson {
/**
* The key of a label is a syntactically valid URL (as per RFC 1738) with the "scheme" and initial
* slashes omitted and with the additional restrictions noted below. Each key should be globally
* unique. The "host" portion is called the "namespace" and is not necessarily resolvable to a
* network endpoint. Instead, the namespace indicates what system or entity defines the semantics
* of the label. Namespaces do not restrict the set of objects to which a label may be
* associated.
*
* Keys are defined by the following grammar:
*
* key = hostname "/" kpath kpath = ksegment *[ "/" ksegment ] ksegment
* = alphadigit | *[ alphadigit | "-" | "_" | "." ]
*
* where "hostname" and "alphadigit" are defined as in RFC 1738.
*
* Example key: spanner.google.com/universe
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String key;
/**
* An integer value.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key @com.google.api.client.json.JsonString
private java.lang.Long numValue;
/**
* A string value.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String strValue;
/**
* The key of a label is a syntactically valid URL (as per RFC 1738) with the "scheme" and initial
* slashes omitted and with the additional restrictions noted below. Each key should be globally
* unique. The "host" portion is called the "namespace" and is not necessarily resolvable to a
* network endpoint. Instead, the namespace indicates what system or entity defines the semantics
* of the label. Namespaces do not restrict the set of objects to which a label may be
* associated.
*
* Keys are defined by the following grammar:
*
* key = hostname "/" kpath kpath = ksegment *[ "/" ksegment ] ksegment
* = alphadigit | *[ alphadigit | "-" | "_" | "." ]
*
* where "hostname" and "alphadigit" are defined as in RFC 1738.
*
* Example key: spanner.google.com/universe
* @return value or {@code null} for none
*/
public java.lang.String getKey() {
return key;
}
/**
* The key of a label is a syntactically valid URL (as per RFC 1738) with the "scheme" and initial
* slashes omitted and with the additional restrictions noted below. Each key should be globally
* unique. The "host" portion is called the "namespace" and is not necessarily resolvable to a
* network endpoint. Instead, the namespace indicates what system or entity defines the semantics
* of the label. Namespaces do not restrict the set of objects to which a label may be
* associated.
*
* Keys are defined by the following grammar:
*
* key = hostname "/" kpath kpath = ksegment *[ "/" ksegment ] ksegment
* = alphadigit | *[ alphadigit | "-" | "_" | "." ]
*
* where "hostname" and "alphadigit" are defined as in RFC 1738.
*
* Example key: spanner.google.com/universe
* @param key key or {@code null} for none
*/
public Label setKey(java.lang.String key) {
this.key = key;
return this;
}
/**
* An integer value.
* @return value or {@code null} for none
*/
public java.lang.Long getNumValue() {
return numValue;
}
/**
* An integer value.
* @param numValue numValue or {@code null} for none
*/
public Label setNumValue(java.lang.Long numValue) {
this.numValue = numValue;
return this;
}
/**
* A string value.
* @return value or {@code null} for none
*/
public java.lang.String getStrValue() {
return strValue;
}
/**
* A string value.
* @param strValue strValue or {@code null} for none
*/
public Label setStrValue(java.lang.String strValue) {
this.strValue = strValue;
return this;
}
@Override
public Label set(String fieldName, Object value) {
return (Label) super.set(fieldName, value);
}
@Override
public Label clone() {
return (Label) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy