Class RustTestDescriptionArg.Builder

  • Enclosing class:
    RustTestDescriptionArg

    @NotThreadSafe
    public static final class RustTestDescriptionArg.Builder
    extends Object
    Builds instances of type RustTestDescriptionArg. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        public final RustTestDescriptionArg.Builder from​(HasVersionUniverse instance)
        Fill a builder with attribute values from the provided com.facebook.buck.versions.HasVersionUniverse instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(HasNamedDeclaredDeps instance)
        Fill a builder with attribute values from the provided com.facebook.buck.features.rust.HasNamedDeclaredDeps instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(HasDeclaredDeps instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.description.arg.HasDeclaredDeps instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(RustTestDescriptionArg instance)
        Fill a builder with attribute values from the provided RustTestDescriptionArg instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(com.facebook.buck.features.rust.RustTestDescription.AbstractRustTestDescriptionArg instance)
        Copy abstract value type AbstractRustTestDescriptionArg instance into builder.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(HasDefaultPlatform instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.description.arg.HasDefaultPlatform instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(RustCommonArgs instance)
        Fill a builder with attribute values from the provided com.facebook.buck.features.rust.RustCommonArgs instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(BuildRuleArg instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.description.arg.BuildRuleArg instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(HasSrcs instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.description.arg.HasSrcs instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final RustTestDescriptionArg.Builder from​(ConstructorArg instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.description.arg.ConstructorArg instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • addContacts

        public final RustTestDescriptionArg.Builder addContacts​(String element)
        Adds one element to contacts set.
        Parameters:
        element - A contacts element
        Returns:
        this builder for use in a chained invocation
      • addContacts

        public final RustTestDescriptionArg.Builder addContacts​(String... elements)
        Adds elements to contacts set.
        Parameters:
        elements - An array of contacts elements
        Returns:
        this builder for use in a chained invocation
      • setContacts

        public final RustTestDescriptionArg.Builder setContacts​(Iterable<String> elements)
        Sets or replaces all elements for contacts set.
        Parameters:
        elements - An iterable of contacts elements
        Returns:
        this builder for use in a chained invocation
      • setRpath

        public final RustTestDescriptionArg.Builder setRpath​(boolean rpath)
        Initializes the value for the rpath attribute.

        If not set, this attribute will have a default value as returned by the initializer of rpath.

        Parameters:
        rpath - The value for rpath
        Returns:
        this builder for use in a chained invocation
      • setFramework

        public final RustTestDescriptionArg.Builder setFramework​(boolean framework)
        Initializes the value for the framework attribute.

        If not set, this attribute will have a default value as returned by the initializer of framework.

        Parameters:
        framework - The value for framework
        Returns:
        this builder for use in a chained invocation
      • putMappedSrcs

        public final RustTestDescriptionArg.Builder putMappedSrcs​(SourcePath key,
                                                                  String value)
        Put one entry to the mappedSrcs map.
        Parameters:
        key - The key in the mappedSrcs map
        value - The associated value in the mappedSrcs map
        Returns:
        this builder for use in a chained invocation
      • setMappedSrcs

        public final RustTestDescriptionArg.Builder setMappedSrcs​(Map<? extends SourcePath,​? extends String> entries)
        Sets or replaces all mappings from the specified map as entries for the mappedSrcs map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the mappedSrcs map
        Returns:
        this builder for use in a chained invocation
      • putAllMappedSrcs

        public final RustTestDescriptionArg.Builder putAllMappedSrcs​(Map<? extends SourcePath,​? extends String> entries)
        Put all mappings from the specified map as entries to mappedSrcs map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the mappedSrcs map
        Returns:
        this builder for use in a chained invocation
      • setEnv

        public final RustTestDescriptionArg.Builder setEnv​(Map<String,​? extends StringWithMacros> entries)
        Sets or replaces all mappings from the specified map as entries for the env map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the env map
        Returns:
        this builder for use in a chained invocation
      • putAllEnv

        public final RustTestDescriptionArg.Builder putAllEnv​(Map<String,​? extends StringWithMacros> entries)
        Put all mappings from the specified map as entries to env map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the env map
        Returns:
        this builder for use in a chained invocation
      • setEdition

        public final RustTestDescriptionArg.Builder setEdition​(String edition)
        Initializes the optional value edition to edition.
        Parameters:
        edition - The value for edition
        Returns:
        this builder for chained invocation
      • addFeatures

        public final RustTestDescriptionArg.Builder addFeatures​(String element)
        Adds one element to features sortedSet.
        Parameters:
        element - A features element
        Returns:
        this builder for use in a chained invocation
      • addFeatures

        public final RustTestDescriptionArg.Builder addFeatures​(String... elements)
        Adds elements to features sortedSet.
        Parameters:
        elements - An array of features elements
        Returns:
        this builder for use in a chained invocation
      • setFeatures

        public final RustTestDescriptionArg.Builder setFeatures​(Iterable<String> elements)
        Sets or replaces all elements for features sortedSet.
        Parameters:
        elements - An iterable of features elements
        Returns:
        this builder for use in a chained invocation
      • setCrate

        public final RustTestDescriptionArg.Builder setCrate​(String crate)
        Initializes the optional value crate to crate.
        Parameters:
        crate - The value for crate
        Returns:
        this builder for chained invocation
      • setCrateRoot

        public final RustTestDescriptionArg.Builder setCrateRoot​(String crateRoot)
        Initializes the optional value crateRoot to crateRoot.
        Parameters:
        crateRoot - The value for crateRoot
        Returns:
        this builder for chained invocation
      • addLabels

        public final RustTestDescriptionArg.Builder addLabels​(String element)
        Adds one element to labels sortedSet.
        Parameters:
        element - A labels element
        Returns:
        this builder for use in a chained invocation
      • addLabels

        public final RustTestDescriptionArg.Builder addLabels​(String... elements)
        Adds elements to labels sortedSet.
        Parameters:
        elements - An array of labels elements
        Returns:
        this builder for use in a chained invocation
      • setLabels

        public final RustTestDescriptionArg.Builder setLabels​(Iterable<String> elements)
        Sets or replaces all elements for labels sortedSet.
        Parameters:
        elements - An iterable of labels elements
        Returns:
        this builder for use in a chained invocation
      • setName

        public final RustTestDescriptionArg.Builder setName​(String name)
        Initializes the value for the name attribute.
        Parameters:
        name - The value for name
        Returns:
        this builder for use in a chained invocation
      • putNamedDeps

        public final RustTestDescriptionArg.Builder putNamedDeps​(String key,
                                                                 BuildTarget value)
        Put one entry to the namedDeps map.
        Parameters:
        key - The key in the namedDeps map
        value - The associated value in the namedDeps map
        Returns:
        this builder for use in a chained invocation
      • setNamedDeps

        public final RustTestDescriptionArg.Builder setNamedDeps​(Map<String,​? extends BuildTarget> entries)
        Sets or replaces all mappings from the specified map as entries for the namedDeps map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the namedDeps map
        Returns:
        this builder for use in a chained invocation
      • putAllNamedDeps

        public final RustTestDescriptionArg.Builder putAllNamedDeps​(Map<String,​? extends BuildTarget> entries)
        Put all mappings from the specified map as entries to namedDeps map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the namedDeps map
        Returns:
        this builder for use in a chained invocation
      • addDeps

        public final RustTestDescriptionArg.Builder addDeps​(BuildTarget... elements)
        Adds elements to deps sortedSet.
        Parameters:
        elements - An array of deps elements
        Returns:
        this builder for use in a chained invocation
      • setDeps

        public final RustTestDescriptionArg.Builder setDeps​(Iterable<? extends BuildTarget> elements)
        Sets or replaces all elements for deps sortedSet.
        Parameters:
        elements - An iterable of deps elements
        Returns:
        this builder for use in a chained invocation
      • addSrcs

        public final RustTestDescriptionArg.Builder addSrcs​(SourcePath... elements)
        Adds elements to srcs sortedSet.
        Parameters:
        elements - An array of srcs elements
        Returns:
        this builder for use in a chained invocation
      • setSrcs

        public final RustTestDescriptionArg.Builder setSrcs​(Iterable<? extends SourcePath> elements)
        Sets or replaces all elements for srcs sortedSet.
        Parameters:
        elements - An iterable of srcs elements
        Returns:
        this builder for use in a chained invocation
      • setDefaultPlatform

        public final RustTestDescriptionArg.Builder setDefaultPlatform​(Flavor defaultPlatform)
        Initializes the optional value defaultPlatform to defaultPlatform.
        Parameters:
        defaultPlatform - The value for defaultPlatform
        Returns:
        this builder for chained invocation
      • setDefaultPlatform

        public final RustTestDescriptionArg.Builder setDefaultPlatform​(Optional<? extends Flavor> defaultPlatform)
        Initializes the optional value defaultPlatform to defaultPlatform.
        Parameters:
        defaultPlatform - The value for defaultPlatform
        Returns:
        this builder for use in a chained invocation
      • setVersionUniverse

        public final RustTestDescriptionArg.Builder setVersionUniverse​(String versionUniverse)
        Initializes the optional value versionUniverse to versionUniverse.
        Parameters:
        versionUniverse - The value for versionUniverse
        Returns:
        this builder for chained invocation
      • setVersionUniverse

        public final RustTestDescriptionArg.Builder setVersionUniverse​(Optional<String> versionUniverse)
        Initializes the optional value versionUniverse to versionUniverse.
        Parameters:
        versionUniverse - The value for versionUniverse
        Returns:
        this builder for use in a chained invocation