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

org.openstack4j.openstack.identity.domain.KeystoneEndpoint Maven / Gradle / Ivy

package org.openstack4j.openstack.identity.domain;

import java.net.URI;
import java.util.List;

import org.openstack4j.model.identity.Endpoint;
import org.openstack4j.model.identity.builder.EndpointBuilder;
import org.openstack4j.openstack.common.ListResult;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Objects;

/**
 * Endpoint Model is used to describe a network address which is described by URL's and other service
 * information depending on the context it was retrieved in.
 * 
 * @author Jeremy Unruh
 * 
 * @see  {
		private static final long serialVersionUID = 1L;
		
		@JsonProperty("endpoints")
		private List endpoints;
		
		public List value() {
			return endpoints;
		}
	}
	
	public static class EndPointConcreteBuilder implements EndpointBuilder {
		
		protected KeystoneEndpoint model;
		
		protected EndPointConcreteBuilder() {
			this(new KeystoneEndpoint());
		}
		
		EndPointConcreteBuilder(KeystoneEndpoint model) {
			this.model = model;
		}
		
		/**
		 * @see KeystoneEndpoint#getRegion()
		 */
		public EndpointBuilder region(String region) {
			model.region = region;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getPublicURL()
		 */
		public EndpointBuilder publicURL(URI publicURL) {
			model.publicURL = publicURL;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getInternalURL()
		 */
		public EndpointBuilder internalURL(URI internalURL) {
			model.internalURL = internalURL;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getTenantId()
		 */
		public EndpointBuilder tenantId(String tenantId) {
			model.tenantId = tenantId;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getType()
		 */
		public EndpointBuilder type(String type) {
			model.type = type;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getId()
		 */
		public EndpointBuilder id(String id) {
			model.id = id;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getName()
		 */
		public EndpointBuilder name(String name) {
			model.name = name;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getAdminURL()
		 */
		public EndpointBuilder adminURL(URI adminURL) {
			model.adminURL = adminURL;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getVersionInfo()
		 */
		public EndpointBuilder versionInfo(URI versionInfo) {
			model.versionInfo = versionInfo;
			return this;
		}
		
		/**
		 * @see KeystoneEndpoint#getVersionList()
		 */
		public EndpointBuilder versionList(URI versionList) {
			model.versionList = versionList;
			return this;
		}
		
		@Override
		public KeystoneEndpoint build() {
			return model;
		}

		@Override
		public EndpointBuilder from(Endpoint in) {
			this.model = (KeystoneEndpoint)in;
			return this;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy