Class ImmutableYangNetconfError.Builder
- java.lang.Object
-
- org.opendaylight.yangtools.yang.data.api.ImmutableYangNetconfError.Builder
-
- All Implemented Interfaces:
ImmutableYangNetconfError.BuildFinal
,ImmutableYangNetconfError.SeverityBuildStage
,ImmutableYangNetconfError.TagBuildStage
,ImmutableYangNetconfError.TypeBuildStage
- Enclosing class:
- ImmutableYangNetconfError
public static final class ImmutableYangNetconfError.Builder extends Object implements ImmutableYangNetconfError.SeverityBuildStage, ImmutableYangNetconfError.TypeBuildStage, ImmutableYangNetconfError.TagBuildStage, ImmutableYangNetconfError.BuildFinal
Builds instances of typeImmutableYangNetconfError
. Initialize attributes and then invoke thebuild()
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 Summary
-
-
-
Method Detail
-
severity
public final ImmutableYangNetconfError.Builder severity(ErrorSeverity severity)
Initializes the value for theseverity
attribute.- Specified by:
severity
in interfaceImmutableYangNetconfError.SeverityBuildStage
- Parameters:
severity
- The value for severity- Returns:
this
builder for use in a chained invocation
-
type
public final ImmutableYangNetconfError.Builder type(ErrorType type)
Initializes the value for thetype
attribute.- Specified by:
type
in interfaceImmutableYangNetconfError.TypeBuildStage
- Parameters:
type
- The value for type- Returns:
this
builder for use in a chained invocation
-
tag
public final ImmutableYangNetconfError.Builder tag(ErrorTag tag)
Initializes the value for thetag
attribute.- Specified by:
tag
in interfaceImmutableYangNetconfError.TagBuildStage
- Parameters:
tag
- The value for tag- Returns:
this
builder for use in a chained invocation
-
message
public final ImmutableYangNetconfError.Builder message(@Nullable String message)
Initializes the value for themessage
attribute.- Specified by:
message
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
message
- The value for message (can benull
)- Returns:
this
builder for use in a chained invocation
-
appTag
public final ImmutableYangNetconfError.Builder appTag(@Nullable String appTag)
Initializes the value for theappTag
attribute.- Specified by:
appTag
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
appTag
- The value for appTag (can benull
)- Returns:
this
builder for use in a chained invocation
-
path
public final ImmutableYangNetconfError.Builder path(@Nullable YangInstanceIdentifier path)
Initializes the value for thepath
attribute.- Specified by:
path
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
path
- The value for path (can benull
)- Returns:
this
builder for use in a chained invocation
-
addInfo
public final ImmutableYangNetconfError.Builder addInfo(YangErrorInfo element)
Adds one element toinfo
list.- Specified by:
addInfo
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
element
- A info element- Returns:
this
builder for use in a chained invocation
-
addInfo
public final ImmutableYangNetconfError.Builder addInfo(YangErrorInfo... elements)
Adds elements toinfo
list.- Specified by:
addInfo
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
elements
- An array of info elements- Returns:
this
builder for use in a chained invocation
-
addAllInfo
public final ImmutableYangNetconfError.Builder addAllInfo(Iterable<? extends YangErrorInfo> elements)
Adds elements toinfo
list.- Specified by:
addAllInfo
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
elements
- An iterable of info elements- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableYangNetconfError build()
Builds a newImmutableYangNetconfError
.- Specified by:
build
in interfaceImmutableYangNetconfError.BuildFinal
- Returns:
- An immutable instance of YangNetconfError
- Throws:
IllegalStateException
- if any required attributes are missing
-
-