2015-08-26 18:57:50 -04:00
# coding: utf-8
"""
Copyright 2015 SmartBear Software
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 .
"""
from pprint import pformat
from six import iteritems
class V1ObjectMeta ( object ) :
"""
NOTE : This class is auto generated by the swagger code generator program .
Do not edit the class manually .
"""
def __init__ ( self ) :
"""
Swagger model
: param dict swaggerTypes : The key is attribute name
and the value is attribute type .
: param dict attributeMap : The key is attribute name
and the value is json key in definition .
"""
self . swagger_types = {
' name ' : ' str ' ,
' generate_name ' : ' str ' ,
' namespace ' : ' str ' ,
' self_link ' : ' str ' ,
' uid ' : ' str ' ,
' resource_version ' : ' str ' ,
' generation ' : ' int ' ,
' creation_timestamp ' : ' str ' ,
' deletion_timestamp ' : ' str ' ,
2016-04-22 07:11:06 -04:00
' deletion_grace_period_seconds ' : ' int ' ,
2016-09-07 14:56:28 -04:00
' labels ' : ' dict(str, str) ' ,
2016-04-22 07:11:06 -04:00
' annotations ' : ' object '
2015-08-26 18:57:50 -04:00
}
self . attribute_map = {
' name ' : ' name ' ,
' generate_name ' : ' generateName ' ,
' namespace ' : ' namespace ' ,
' self_link ' : ' selfLink ' ,
' uid ' : ' uid ' ,
' resource_version ' : ' resourceVersion ' ,
' generation ' : ' generation ' ,
' creation_timestamp ' : ' creationTimestamp ' ,
' deletion_timestamp ' : ' deletionTimestamp ' ,
2016-04-22 07:11:06 -04:00
' deletion_grace_period_seconds ' : ' deletionGracePeriodSeconds ' ,
2015-08-26 18:57:50 -04:00
' labels ' : ' labels ' ,
' annotations ' : ' annotations '
}
self . _name = None
self . _generate_name = None
self . _namespace = None
self . _self_link = None
self . _uid = None
self . _resource_version = None
self . _generation = None
self . _creation_timestamp = None
self . _deletion_timestamp = None
2016-04-22 07:11:06 -04:00
self . _deletion_grace_period_seconds = None
2015-08-26 18:57:50 -04:00
self . _labels = None
self . _annotations = None
@property
def name ( self ) :
"""
Gets the name of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
Name must be unique within a namespace . Is required when creating resources , although some resources may allow a client to request the generation of an appropriate name automatically . Name is primarily intended for creation idempotence and configuration definition . Cannot be updated . More info : http : / / releases . k8s . io / release - 1.2 / docs / user - guide / identifiers . md #names
2015-08-26 18:57:50 -04:00
: return : The name of this V1ObjectMeta .
: rtype : str
"""
return self . _name
@name.setter
def name ( self , name ) :
"""
Sets the name of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
Name must be unique within a namespace . Is required when creating resources , although some resources may allow a client to request the generation of an appropriate name automatically . Name is primarily intended for creation idempotence and configuration definition . Cannot be updated . More info : http : / / releases . k8s . io / release - 1.2 / docs / user - guide / identifiers . md #names
2015-08-26 18:57:50 -04:00
: param name : The name of this V1ObjectMeta .
: type : str
"""
self . _name = name
@property
def generate_name ( self ) :
"""
Gets the generate_name of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
GenerateName is an optional prefix , used by the server , to generate a unique name ONLY IF the Name field has not been provided . If this field is used , the name returned to the client will be different than the name passed . This value will also be combined with a unique suffix . The provided value has the same validation rules as the Name field , and may be truncated by the length of the suffix required to make the value unique on the server . \n \nIf this field is specified and the generated name exists , the server will NOT return a 409 - instead , it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted , and the client should retry ( optionally after the time indicated in the Retry - After header ) . \n \nApplied only if Name is not specified . More info : http : / / releases . k8s . io / release - 1.2 / docs / devel / api - conventions . md #idempotency
2015-08-26 18:57:50 -04:00
: return : The generate_name of this V1ObjectMeta .
: rtype : str
"""
return self . _generate_name
@generate_name.setter
def generate_name ( self , generate_name ) :
"""
Sets the generate_name of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
GenerateName is an optional prefix , used by the server , to generate a unique name ONLY IF the Name field has not been provided . If this field is used , the name returned to the client will be different than the name passed . This value will also be combined with a unique suffix . The provided value has the same validation rules as the Name field , and may be truncated by the length of the suffix required to make the value unique on the server . \n \nIf this field is specified and the generated name exists , the server will NOT return a 409 - instead , it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted , and the client should retry ( optionally after the time indicated in the Retry - After header ) . \n \nApplied only if Name is not specified . More info : http : / / releases . k8s . io / release - 1.2 / docs / devel / api - conventions . md #idempotency
2015-08-26 18:57:50 -04:00
: param generate_name : The generate_name of this V1ObjectMeta .
: type : str
"""
self . _generate_name = generate_name
@property
def namespace ( self ) :
"""
Gets the namespace of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
Namespace defines the space within each name must be unique . An empty namespace is equivalent to the \" default \" namespace, but \" default \" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. \n \n Must be a DNS_LABEL. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/namespaces.md
2015-08-26 18:57:50 -04:00
: return : The namespace of this V1ObjectMeta .
: rtype : str
"""
return self . _namespace
@namespace.setter
def namespace ( self , namespace ) :
"""
Sets the namespace of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
Namespace defines the space within each name must be unique . An empty namespace is equivalent to the \" default \" namespace, but \" default \" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. \n \n Must be a DNS_LABEL. Cannot be updated. More info: http://releases.k8s.io/release-1.2/docs/user-guide/namespaces.md
2015-08-26 18:57:50 -04:00
: param namespace : The namespace of this V1ObjectMeta .
: type : str
"""
self . _namespace = namespace
@property
def self_link ( self ) :
"""
Gets the self_link of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
SelfLink is a URL representing this object . Populated by the system . Read - only .
2015-08-26 18:57:50 -04:00
: return : The self_link of this V1ObjectMeta .
: rtype : str
"""
return self . _self_link
@self_link.setter
def self_link ( self , self_link ) :
"""
Sets the self_link of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
SelfLink is a URL representing this object . Populated by the system . Read - only .
2015-08-26 18:57:50 -04:00
: param self_link : The self_link of this V1ObjectMeta .
: type : str
"""
self . _self_link = self_link
@property
def uid ( self ) :
"""
Gets the uid of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
UID is the unique in time and space value for this object . It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations . \n \nPopulated by the system . Read - only . More info : http : / / releases . k8s . io / release - 1.2 / docs / user - guide / identifiers . md #uids
2015-08-26 18:57:50 -04:00
: return : The uid of this V1ObjectMeta .
: rtype : str
"""
return self . _uid
@uid.setter
def uid ( self , uid ) :
"""
Sets the uid of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
UID is the unique in time and space value for this object . It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations . \n \nPopulated by the system . Read - only . More info : http : / / releases . k8s . io / release - 1.2 / docs / user - guide / identifiers . md #uids
2015-08-26 18:57:50 -04:00
: param uid : The uid of this V1ObjectMeta .
: type : str
"""
self . _uid = uid
@property
def resource_version ( self ) :
"""
Gets the resource_version of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed . May be used for optimistic concurrency , change detection , and the watch operation on a resource or set of resources . Clients must treat these values as opaque and passed unmodified back to the server . They may only be valid for a particular resource or set of resources . \n \nPopulated by the system . Read - only . Value must be treated as opaque by clients and . More info : http : / / releases . k8s . io / release - 1.2 / docs / devel / api - conventions . md #concurrency-control-and-consistency
2015-08-26 18:57:50 -04:00
: return : The resource_version of this V1ObjectMeta .
: rtype : str
"""
return self . _resource_version
@resource_version.setter
def resource_version ( self , resource_version ) :
"""
Sets the resource_version of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed . May be used for optimistic concurrency , change detection , and the watch operation on a resource or set of resources . Clients must treat these values as opaque and passed unmodified back to the server . They may only be valid for a particular resource or set of resources . \n \nPopulated by the system . Read - only . Value must be treated as opaque by clients and . More info : http : / / releases . k8s . io / release - 1.2 / docs / devel / api - conventions . md #concurrency-control-and-consistency
2015-08-26 18:57:50 -04:00
: param resource_version : The resource_version of this V1ObjectMeta .
: type : str
"""
self . _resource_version = resource_version
@property
def generation ( self ) :
"""
Gets the generation of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
A sequence number representing a specific generation of the desired state . Populated by the system . Read - only .
2015-08-26 18:57:50 -04:00
: return : The generation of this V1ObjectMeta .
: rtype : int
"""
return self . _generation
@generation.setter
def generation ( self , generation ) :
"""
Sets the generation of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
A sequence number representing a specific generation of the desired state . Populated by the system . Read - only .
2015-08-26 18:57:50 -04:00
: param generation : The generation of this V1ObjectMeta .
: type : int
"""
self . _generation = generation
@property
def creation_timestamp ( self ) :
"""
Gets the creation_timestamp of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
CreationTimestamp is a timestamp representing the server time when this object was created . It is not guaranteed to be set in happens - before order across separate operations . Clients may not set this value . It is represented in RFC3339 form and is in UTC . \n \nPopulated by the system . Read - only . Null for lists . More info : http : / / releases . k8s . io / release - 1.2 / docs / devel / api - conventions . md #metadata
2015-08-26 18:57:50 -04:00
: return : The creation_timestamp of this V1ObjectMeta .
: rtype : str
"""
return self . _creation_timestamp
@creation_timestamp.setter
def creation_timestamp ( self , creation_timestamp ) :
"""
Sets the creation_timestamp of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
CreationTimestamp is a timestamp representing the server time when this object was created . It is not guaranteed to be set in happens - before order across separate operations . Clients may not set this value . It is represented in RFC3339 form and is in UTC . \n \nPopulated by the system . Read - only . Null for lists . More info : http : / / releases . k8s . io / release - 1.2 / docs / devel / api - conventions . md #metadata
2015-08-26 18:57:50 -04:00
: param creation_timestamp : The creation_timestamp of this V1ObjectMeta .
: type : str
"""
self . _creation_timestamp = creation_timestamp
@property
def deletion_timestamp ( self ) :
"""
Gets the deletion_timestamp of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted . This field is set by the server when a graceful deletion is requested by the user , and is not directly settable by a client . The resource will be deleted ( no longer visible from resource lists , and not reachable by name ) after the time in this field . Once set , this value may not be unset or be set further into the future , although it may be shortened or the resource may be deleted prior to this time . For example , a user may request that a pod is deleted in 30 seconds . The Kubelet will react by sending a graceful termination signal to the containers in the pod . Once the resource is deleted in the API , the Kubelet will send a hard termination signal to the container . If not set , graceful deletion of the object has not been requested . \n \nPopulated by the system when a graceful deletion is requested . Read - only . More info : http : / / releases . k8s . io / release - 1.2 / docs / devel / api - conventions . md #metadata
2015-08-26 18:57:50 -04:00
: return : The deletion_timestamp of this V1ObjectMeta .
: rtype : str
"""
return self . _deletion_timestamp
@deletion_timestamp.setter
def deletion_timestamp ( self , deletion_timestamp ) :
"""
Sets the deletion_timestamp of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted . This field is set by the server when a graceful deletion is requested by the user , and is not directly settable by a client . The resource will be deleted ( no longer visible from resource lists , and not reachable by name ) after the time in this field . Once set , this value may not be unset or be set further into the future , although it may be shortened or the resource may be deleted prior to this time . For example , a user may request that a pod is deleted in 30 seconds . The Kubelet will react by sending a graceful termination signal to the containers in the pod . Once the resource is deleted in the API , the Kubelet will send a hard termination signal to the container . If not set , graceful deletion of the object has not been requested . \n \nPopulated by the system when a graceful deletion is requested . Read - only . More info : http : / / releases . k8s . io / release - 1.2 / docs / devel / api - conventions . md #metadata
2015-08-26 18:57:50 -04:00
: param deletion_timestamp : The deletion_timestamp of this V1ObjectMeta .
: type : str
"""
self . _deletion_timestamp = deletion_timestamp
2016-04-22 07:11:06 -04:00
@property
def deletion_grace_period_seconds ( self ) :
"""
Gets the deletion_grace_period_seconds of this V1ObjectMeta .
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system . Only set when deletionTimestamp is also set . May only be shortened . Read - only .
: return : The deletion_grace_period_seconds of this V1ObjectMeta .
: rtype : int
"""
return self . _deletion_grace_period_seconds
@deletion_grace_period_seconds.setter
def deletion_grace_period_seconds ( self , deletion_grace_period_seconds ) :
"""
Sets the deletion_grace_period_seconds of this V1ObjectMeta .
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system . Only set when deletionTimestamp is also set . May only be shortened . Read - only .
: param deletion_grace_period_seconds : The deletion_grace_period_seconds of this V1ObjectMeta .
: type : int
"""
self . _deletion_grace_period_seconds = deletion_grace_period_seconds
2015-08-26 18:57:50 -04:00
@property
def labels ( self ) :
"""
Gets the labels of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
Map of string keys and values that can be used to organize and categorize ( scope and select ) objects . May match selectors of replication controllers and services . More info : http : / / releases . k8s . io / release - 1.2 / docs / user - guide / labels . md
2015-08-26 18:57:50 -04:00
: return : The labels of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
: rtype : object
2015-08-26 18:57:50 -04:00
"""
return self . _labels
@labels.setter
def labels ( self , labels ) :
"""
Sets the labels of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
Map of string keys and values that can be used to organize and categorize ( scope and select ) objects . May match selectors of replication controllers and services . More info : http : / / releases . k8s . io / release - 1.2 / docs / user - guide / labels . md
2015-08-26 18:57:50 -04:00
: param labels : The labels of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
: type : object
2015-08-26 18:57:50 -04:00
"""
self . _labels = labels
@property
def annotations ( self ) :
"""
Gets the annotations of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata . They are not queryable and should be preserved when modifying objects . More info : http : / / releases . k8s . io / release - 1.2 / docs / user - guide / annotations . md
2015-08-26 18:57:50 -04:00
: return : The annotations of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
: rtype : object
2015-08-26 18:57:50 -04:00
"""
return self . _annotations
@annotations.setter
def annotations ( self , annotations ) :
"""
Sets the annotations of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata . They are not queryable and should be preserved when modifying objects . More info : http : / / releases . k8s . io / release - 1.2 / docs / user - guide / annotations . md
2015-08-26 18:57:50 -04:00
: param annotations : The annotations of this V1ObjectMeta .
2016-04-22 07:11:06 -04:00
: type : object
2015-08-26 18:57:50 -04:00
"""
self . _annotations = annotations
def to_dict ( self ) :
"""
Return model properties dict
"""
result = { }
for attr , _ in iteritems ( self . swagger_types ) :
value = getattr ( self , attr )
if isinstance ( value , list ) :
result [ attr ] = list ( map (
lambda x : x . to_dict ( ) if hasattr ( x , " to_dict " ) else x ,
value
) )
elif hasattr ( value , " to_dict " ) :
result [ attr ] = value . to_dict ( )
else :
result [ attr ] = value
return result
def to_str ( self ) :
"""
Return model properties str
"""
return pformat ( self . to_dict ( ) )
def __repr__ ( self ) :
"""
For ` print ` and ` pprint `
"""
return self . to_str ( )