Class PackageOriginRestrictions

    • Method Detail

      • publish

        public final AllowPublish publish()

        The package origin configuration that determines if new versions of the package can be published directly to the repository.

        If the service returns an enum value that is not available in the current SDK version, publish will return AllowPublish.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from publishAsString().

        Returns:
        The package origin configuration that determines if new versions of the package can be published directly to the repository.
        See Also:
        AllowPublish
      • publishAsString

        public final String publishAsString()

        The package origin configuration that determines if new versions of the package can be published directly to the repository.

        If the service returns an enum value that is not available in the current SDK version, publish will return AllowPublish.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from publishAsString().

        Returns:
        The package origin configuration that determines if new versions of the package can be published directly to the repository.
        See Also:
        AllowPublish
      • upstream

        public final AllowUpstream upstream()

        The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

        If the service returns an enum value that is not available in the current SDK version, upstream will return AllowUpstream.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from upstreamAsString().

        Returns:
        The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.
        See Also:
        AllowUpstream
      • upstreamAsString

        public final String upstreamAsString()

        The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

        If the service returns an enum value that is not available in the current SDK version, upstream will return AllowUpstream.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from upstreamAsString().

        Returns:
        The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.
        See Also:
        AllowUpstream
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)