Package com.vmware.nsx_policy.model
Class Segment.Builder
- java.lang.Object
-
- com.vmware.nsx_policy.model.Segment.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Segment
build()
Segment.Builder
setAddressBindings(java.util.List<PortAddressBindingEntry> addressBindings)
Static address binding used for the Segment.Segment.Builder
setAdminState(java.lang.String adminState)
Possible values are:Segment.ADMIN_STATE_UP
Segment.ADMIN_STATE_DOWN
Admin state represents desired state of segment.Segment.Builder
setAdvancedConfig(SegmentAdvancedConfig advancedConfig)
Segment.Builder
setBridgeProfiles(java.util.List<BridgeProfileConfig> bridgeProfiles)
Multiple distinct L2 bridge profiles can be configured.Segment.Builder
setChildren(java.util.List<com.vmware.vapi.bindings.Structure> children)
Subtree for this type within policy tree containing nested elements.Segment.Builder
setConnectivityPath(java.lang.String connectivityPath)
Policy path to the connecting Tier-0 or Tier-1 or label of type Tier0.Segment.Builder
setCreateTime(java.lang.Long createTime)
Timestamp of resource creation format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setCreateUser(java.lang.String createUser)
ID of the user who created this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setDescription(java.lang.String description)
Description of this resourceSegment.Builder
setDhcpConfigPath(java.lang.String dhcpConfigPath)
Policy path to DHCP server or relay configuration to use for all IPv4 & IPv6 subnets configured on this segment.Segment.Builder
setDisplayName(java.lang.String displayName)
Defaults to ID if not setSegment.Builder
setDomainName(java.lang.String domainName)
DNS domain nameSegment.Builder
setEvpnSegment(java.lang.Boolean evpnSegment)
Flag to indicate if the Segment is a Child-Segment of type EVPN.Segment.Builder
setEvpnTenantConfigPath(java.lang.String evpnTenantConfigPath)
Policy path to the EvpnTenantConfig resource.Segment.Builder
setExtraConfigs(java.util.List<SegmentExtraConfig> extraConfigs)
This property could be used for vendor specific configuration in key value string pairs, the setting in extra_configs will be automatically inheritted by segment ports in the Segment.Segment.Builder
setFederationConfig(FederationConnectivityConfig federationConfig)
Segment.Builder
setId(java.lang.String id)
Unique identifier of this resourceSegment.Builder
setL2Extension(L2Extension l2Extension)
Segment.Builder
setLastModifiedTime(java.lang.Long lastModifiedTime)
Timestamp of last modification format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setLastModifiedUser(java.lang.String lastModifiedUser)
ID of the user who last modified this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setLinks(java.util.List<ResourceLink> links)
The server will populate this field when returing the resource.Segment.Builder
setLsId(java.lang.String lsId)
This property is deprecated.Segment.Builder
setMacPoolId(java.lang.String macPoolId)
Mac pool id that associated with a Segment.Segment.Builder
setMarkedForDelete(java.lang.Boolean markedForDelete)
Intent objects are not directly deleted from the system when a delete is invoked on them.Segment.Builder
setMetadataProxyPaths(java.util.List<java.lang.String> metadataProxyPaths)
Policy path to metadata proxy configuration.Segment.Builder
setOriginSiteId(java.lang.String originSiteId)
This is a UUID generated by the system for knowing which site owns an object.Segment.Builder
setOverlayId(java.lang.Long overlayId)
Used for overlay connectivity of segments.Segment.Builder
setOverridden(java.lang.Boolean overridden)
Global intent objects cannot be modified by the user.Segment.Builder
setOwnerId(java.lang.String ownerId)
This is a UUID generated by the system for knowing who owns this object.Segment.Builder
setParentPath(java.lang.String parentPath)
Path of its parent This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setPath(java.lang.String path)
Absolute path of this object This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setProtection(java.lang.String protection)
Protection status is one of the following: PROTECTED - the client who retrieved the entity is not allowed to modify it.Segment.Builder
setRealizationId(java.lang.String realizationId)
This is a UUID generated by the system for realizing the entity object.Segment.Builder
setRelativePath(java.lang.String relativePath)
Path relative from its parent This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setRemotePath(java.lang.String remotePath)
This is the path of the object on the local managers when queried on the NSX+ service, and path of the object on NSX+ service when queried from the local managers.Segment.Builder
setReplicationMode(java.lang.String replicationMode)
Possible values are:Segment.REPLICATION_MODE_MTEP
Segment.REPLICATION_MODE_SOURCE
If this field is not set for overlay segment, then the default of MTEP will be used.Segment.Builder
setResourceType(java.lang.String resourceType)
The type of this resource.Segment.Builder
setRevision(java.lang.Long revision)
The _revision property describes the current revision of the resource.Segment.Builder
setSchema(java.lang.String schema)
Schema for this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setSelf(SelfResourceLink self)
Segment.Builder
setSubnets(java.util.List<SegmentSubnet> subnets)
Subnet configuration.Segment.Builder
setSystemOwned(java.lang.Boolean systemOwned)
Indicates system owned resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.Segment.Builder
setTags(java.util.List<Tag> tags)
Opaque identifiers meaningful to the API userSegment.Builder
setTransportZonePath(java.lang.String transportZonePath)
Policy path to the transport zone.Segment.Builder
setType(java.lang.String type)
Possible values are:Segment.TYPE_ROUTED
Segment.TYPE_EXTENDED
Segment.TYPE_ROUTED_AND_EXTENDED
Segment.TYPE_DISCONNECTED
Segment type based on configuration.Segment.Builder
setUniqueId(java.lang.String uniqueId)
This is a UUID generated by the GM/LM to uniquely identify entities in a federated environment.Segment.Builder
setVlanIds(java.util.List<java.lang.String> vlanIds)
VLAN ids for a VLAN backed Segment.
-
-
-
Constructor Detail
-
Builder
public Builder()
Constructor with parameters for the required properties ofSegment
.
-
-
Method Detail
-
setLinks
public Segment.Builder setLinks(java.util.List<ResourceLink> links)
The server will populate this field when returing the resource. Ignored on PUT and POST. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
links
- New value for the property.
-
setSchema
public Segment.Builder setSchema(java.lang.String schema)
Schema for this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
schema
- New value for the property.
-
setSelf
public Segment.Builder setSelf(SelfResourceLink self)
- Parameters:
self
- New value for the property.
-
setRevision
public Segment.Builder setRevision(java.lang.Long revision)
The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected. format: int32- Parameters:
revision
- New value for the property.
-
setCreateTime
public Segment.Builder setCreateTime(java.lang.Long createTime)
Timestamp of resource creation format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
createTime
- New value for the property.
-
setCreateUser
public Segment.Builder setCreateUser(java.lang.String createUser)
ID of the user who created this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
createUser
- New value for the property.
-
setLastModifiedTime
public Segment.Builder setLastModifiedTime(java.lang.Long lastModifiedTime)
Timestamp of last modification format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
lastModifiedTime
- New value for the property.
-
setLastModifiedUser
public Segment.Builder setLastModifiedUser(java.lang.String lastModifiedUser)
ID of the user who last modified this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
lastModifiedUser
- New value for the property.
-
setProtection
public Segment.Builder setProtection(java.lang.String protection)
Protection status is one of the following: PROTECTED - the client who retrieved the entity is not allowed to modify it. NOT_PROTECTED - the client who retrieved the entity is allowed to modify it REQUIRE_OVERRIDE - the client who retrieved the entity is a super user and can modify it, but only when providing the request header X-Allow-Overwrite=true. UNKNOWN - the _protection field could not be determined for this entity. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
protection
- New value for the property.
-
setSystemOwned
public Segment.Builder setSystemOwned(java.lang.Boolean systemOwned)
Indicates system owned resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
systemOwned
- New value for the property.
-
setDescription
public Segment.Builder setDescription(java.lang.String description)
Description of this resource- Parameters:
description
- New value for the property.
-
setDisplayName
public Segment.Builder setDisplayName(java.lang.String displayName)
Defaults to ID if not set- Parameters:
displayName
- New value for the property.
-
setId
public Segment.Builder setId(java.lang.String id)
Unique identifier of this resource- Parameters:
id
- New value for the property.
-
setResourceType
public Segment.Builder setResourceType(java.lang.String resourceType)
The type of this resource.- Parameters:
resourceType
- New value for the property.
-
setTags
public Segment.Builder setTags(java.util.List<Tag> tags)
Opaque identifiers meaningful to the API user- Parameters:
tags
- New value for the property.
-
setOriginSiteId
public Segment.Builder setOriginSiteId(java.lang.String originSiteId)
This is a UUID generated by the system for knowing which site owns an object. This is used in NSX+. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
originSiteId
- New value for the property.
-
setOwnerId
public Segment.Builder setOwnerId(java.lang.String ownerId)
This is a UUID generated by the system for knowing who owns this object. This is used in NSX+. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
ownerId
- New value for the property.
-
setParentPath
public Segment.Builder setParentPath(java.lang.String parentPath)
Path of its parent This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
parentPath
- New value for the property.
-
setPath
public Segment.Builder setPath(java.lang.String path)
Absolute path of this object This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
path
- New value for the property.
-
setRealizationId
public Segment.Builder setRealizationId(java.lang.String realizationId)
This is a UUID generated by the system for realizing the entity object. In most cases this should be same as 'unique_id' of the entity. However, in some cases this can be different because of entities have migrated their unique identifier to NSX Policy intent objects later in the timeline and did not use unique_id for realization. Realization id is helpful for users to debug data path to correlate the configuration with corresponding intent. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
realizationId
- New value for the property.
-
setRelativePath
public Segment.Builder setRelativePath(java.lang.String relativePath)
Path relative from its parent This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
relativePath
- New value for the property.
-
setRemotePath
public Segment.Builder setRemotePath(java.lang.String remotePath)
This is the path of the object on the local managers when queried on the NSX+ service, and path of the object on NSX+ service when queried from the local managers. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
remotePath
- New value for the property.
-
setUniqueId
public Segment.Builder setUniqueId(java.lang.String uniqueId)
This is a UUID generated by the GM/LM to uniquely identify entities in a federated environment. For entities that are stretched across multiple sites, the same ID will be used on all the stretched sites. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
uniqueId
- New value for the property.
-
setChildren
public Segment.Builder setChildren(java.util.List<com.vmware.vapi.bindings.Structure> children)
Subtree for this type within policy tree containing nested elements. Note that this type is applicable to be used in Hierarchical API only.- Parameters:
children
- New value for the property. When clients pass a value of this class as a parameter, the property must contain all the properties defined inChildPolicyConfigResource
. When methods return a value of this class as a return value, the property will contain all the properties defined inChildPolicyConfigResource
.
-
setMarkedForDelete
public Segment.Builder setMarkedForDelete(java.lang.Boolean markedForDelete)
Intent objects are not directly deleted from the system when a delete is invoked on them. They are marked for deletion and only when all the realized entities for that intent object gets deleted, the intent object is deleted. Objects that are marked for deletion are not returned in GET call. One can use the search API to get these objects. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
markedForDelete
- New value for the property.
-
setOverridden
public Segment.Builder setOverridden(java.lang.Boolean overridden)
Global intent objects cannot be modified by the user. However, certain global intent objects can be overridden locally by use of this property. In such cases, the overridden local values take precedence over the globally defined values for the properties. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
overridden
- New value for the property.
-
setAddressBindings
public Segment.Builder setAddressBindings(java.util.List<PortAddressBindingEntry> addressBindings)
Static address binding used for the Segment. This field is deprecated and will be removed in a future release. Please use address_bindings in SegmentPort to configure static bindings.- Parameters:
addressBindings
- New value for the property.
-
setAdminState
public Segment.Builder setAdminState(java.lang.String adminState)
Possible values are: Admin state represents desired state of segment. It does not reflect the state of other logical entities connected/attached to the segment.- Parameters:
adminState
- New value for the property.
-
setAdvancedConfig
public Segment.Builder setAdvancedConfig(SegmentAdvancedConfig advancedConfig)
- Parameters:
advancedConfig
- New value for the property.
-
setBridgeProfiles
public Segment.Builder setBridgeProfiles(java.util.List<BridgeProfileConfig> bridgeProfiles)
Multiple distinct L2 bridge profiles can be configured.- Parameters:
bridgeProfiles
- New value for the property.
-
setConnectivityPath
public Segment.Builder setConnectivityPath(java.lang.String connectivityPath)
Policy path to the connecting Tier-0 or Tier-1 or label of type Tier0. Valid only for segments created under Infra. This field can only be used for overlay segments. VLAN backed segments cannot have connectivity path set.- Parameters:
connectivityPath
- New value for the property.
-
setDhcpConfigPath
public Segment.Builder setDhcpConfigPath(java.lang.String dhcpConfigPath)
Policy path to DHCP server or relay configuration to use for all IPv4 & IPv6 subnets configured on this segment.- Parameters:
dhcpConfigPath
- New value for the property.
-
setDomainName
public Segment.Builder setDomainName(java.lang.String domainName)
DNS domain name- Parameters:
domainName
- New value for the property.
-
setEvpnSegment
public Segment.Builder setEvpnSegment(java.lang.Boolean evpnSegment)
Flag to indicate if the Segment is a Child-Segment of type EVPN. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
evpnSegment
- New value for the property.
-
setEvpnTenantConfigPath
public Segment.Builder setEvpnTenantConfigPath(java.lang.String evpnTenantConfigPath)
Policy path to the EvpnTenantConfig resource. Supported only for Route-Server Evpn Mode. Supported only for Overlay Segments. This will be populated for both Parent and Child segments participating in Evpn Route-Server Mode.- Parameters:
evpnTenantConfigPath
- New value for the property.
-
setExtraConfigs
public Segment.Builder setExtraConfigs(java.util.List<SegmentExtraConfig> extraConfigs)
This property could be used for vendor specific configuration in key value string pairs, the setting in extra_configs will be automatically inheritted by segment ports in the Segment.- Parameters:
extraConfigs
- New value for the property.
-
setFederationConfig
public Segment.Builder setFederationConfig(FederationConnectivityConfig federationConfig)
- Parameters:
federationConfig
- New value for the property.
-
setL2Extension
public Segment.Builder setL2Extension(L2Extension l2Extension)
- Parameters:
l2Extension
- New value for the property.
-
setLsId
public Segment.Builder setLsId(java.lang.String lsId)
This property is deprecated. The property will continue to work as expected for existing segments. The segments that are newly created with ls_id will be ignored. Sepcify pre-creted logical switch id for Segment.- Parameters:
lsId
- New value for the property.
-
setMacPoolId
public Segment.Builder setMacPoolId(java.lang.String macPoolId)
Mac pool id that associated with a Segment.- Parameters:
macPoolId
- New value for the property.
-
setMetadataProxyPaths
public Segment.Builder setMetadataProxyPaths(java.util.List<java.lang.String> metadataProxyPaths)
Policy path to metadata proxy configuration. Multiple distinct MD proxies can be configured.- Parameters:
metadataProxyPaths
- New value for the property.
-
setOverlayId
public Segment.Builder setOverlayId(java.lang.Long overlayId)
Used for overlay connectivity of segments. The overlay_id should be allocated from the pool as definied by enforcement-point. If not provided, it is auto-allocated from the default pool on the enforcement-point. format: int32- Parameters:
overlayId
- New value for the property.
-
setReplicationMode
public Segment.Builder setReplicationMode(java.lang.String replicationMode)
Possible values are: If this field is not set for overlay segment, then the default of MTEP will be used.- Parameters:
replicationMode
- New value for the property.
-
setSubnets
public Segment.Builder setSubnets(java.util.List<SegmentSubnet> subnets)
Subnet configuration. Max 1 subnet- Parameters:
subnets
- New value for the property.
-
setTransportZonePath
public Segment.Builder setTransportZonePath(java.lang.String transportZonePath)
Policy path to the transport zone. Supported for VLAN backed segments as well as Overlay Segments. - This field is required for VLAN backed Segments. - For overlay Segments, it is auto assigned if only one transport zone exists in the enforcement point. Default transport zone is auto assigned for overlay segments if none specified.- Parameters:
transportZonePath
- New value for the property.
-
setType
public Segment.Builder setType(java.lang.String type)
Possible values are: Segment type based on configuration. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
type
- New value for the property.
-
setVlanIds
public Segment.Builder setVlanIds(java.util.List<java.lang.String> vlanIds)
VLAN ids for a VLAN backed Segment. Can be a VLAN id or a range of VLAN ids specified with '-' in between.- Parameters:
vlanIds
- New value for the property.
-
build
public Segment build()
-
-