Class ImmutableCloudRoute

  • All Implemented Interfaces:
    Derivable<CloudRoute>

    @Generated("org.immutables.processor.ProxyProcessor")
    public final class ImmutableCloudRoute
    extends CloudRoute
    Immutable implementation of CloudRoute.

    Use the builder to create immutable instances: ImmutableCloudRoute.builder().

    • Method Detail

      • getV3Metadata

        public org.cloudfoundry.client.v3.Metadata getV3Metadata()
        Specified by:
        getV3Metadata in class CloudEntity
        Returns:
        The value of the v3Metadata attribute
      • getAppsUsingRoute

        public int getAppsUsingRoute()
        Overrides:
        getAppsUsingRoute in class CloudRoute
        Returns:
        The value of the appsUsingRoute attribute
      • hasServiceUsingRoute

        public boolean hasServiceUsingRoute()
        Overrides:
        hasServiceUsingRoute in class CloudRoute
        Returns:
        The value of the hasServiceUsingRoute attribute
      • getHost

        public String getHost()
        Specified by:
        getHost in class CloudRoute
        Returns:
        The value of the host attribute
      • getPath

        public String getPath()
        Specified by:
        getPath in class CloudRoute
        Returns:
        The value of the path attribute
      • withMetadata

        public final ImmutableCloudRoute withMetadata​(CloudMetadata value)
        Copy the current immutable object by setting a value for the metadata attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for metadata (can be null)
        Returns:
        A modified copy of the this object
      • withV3Metadata

        public final ImmutableCloudRoute withV3Metadata​(org.cloudfoundry.client.v3.Metadata value)
        Copy the current immutable object by setting a value for the v3Metadata attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for v3Metadata (can be null)
        Returns:
        A modified copy of the this object
      • withAppsUsingRoute

        public final ImmutableCloudRoute withAppsUsingRoute​(int value)
        Copy the current immutable object by setting a value for the appsUsingRoute attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for appsUsingRoute
        Returns:
        A modified copy of the this object
      • withHasServiceUsingRoute

        public final ImmutableCloudRoute withHasServiceUsingRoute​(boolean value)
        Copy the current immutable object by setting a value for the hasServiceUsingRoute attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for hasServiceUsingRoute
        Returns:
        A modified copy of the this object
      • withDomain

        public final ImmutableCloudRoute withDomain​(CloudDomain value)
        Copy the current immutable object by setting a value for the domain attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for domain (can be null)
        Returns:
        A modified copy of the this object
      • withHost

        public final ImmutableCloudRoute withHost​(String value)
        Copy the current immutable object by setting a value for the host attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for host (can be null)
        Returns:
        A modified copy of the this object
      • withPath

        public final ImmutableCloudRoute withPath​(String value)
        Copy the current immutable object by setting a value for the path attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for path (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(Object another)
        This instance is equal to all instances of ImmutableCloudRoute that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: metadata, v3Metadata, appsUsingRoute, hasServiceUsingRoute, domain, host, path.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value CloudRoute with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableCloudRoute copyOf​(CloudRoute instance)
        Creates an immutable copy of a CloudRoute value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable CloudRoute instance
      • builder

        public static ImmutableCloudRoute.Builder builder()
        Creates a builder for ImmutableCloudRoute.
         ImmutableCloudRoute.builder()
            .metadata(com.sap.cloudfoundry.client.facade.domain.CloudMetadata | null) // nullable metadata
            .v3Metadata(org.cloudfoundry.client.v3.Metadata | null) // nullable v3Metadata
            .appsUsingRoute(int) // optional appsUsingRoute
            .hasServiceUsingRoute(boolean) // optional hasServiceUsingRoute
            .domain(com.sap.cloudfoundry.client.facade.domain.CloudDomain | null) // nullable domain
            .host(String | null) // nullable host
            .path(String | null) // nullable path
            .build();
         
        Returns:
        A new ImmutableCloudRoute builder