private SecurityRuleGroupsImpl(SecurityRuleGroupsBuilder base) { if (base.getKey() == null) { this._key = new SecurityRuleGroupsKey( base.getUuid() ); this._uuid = base.getUuid(); } else { this._key = base.getKey(); this._uuid = _key.getUuid(); } this._description = base.getDescription(); this._name = base.getName(); this._ports = base.getPorts(); this._securityRuleGroup = base.getSecurityRuleGroup(); this._tenantId = base.getTenantId(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.SecurityRuleGroups>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.SecurityRuleGroups>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.SecurityRuleGroups>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.SecurityRuleGroups>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public SecurityRuleGroupsBuilder(SecurityRuleGroups base) { if (base.getKey() == null) { this._key = new SecurityRuleGroupsKey( base.getUuid() ); this._uuid = base.getUuid(); } else { this._key = base.getKey(); this._uuid = _key.getUuid(); } this._description = base.getDescription(); this._name = base.getName(); this._ports = base.getPorts(); this._securityRuleGroup = base.getSecurityRuleGroup(); this._tenantId = base.getTenantId(); if (base instanceof SecurityRuleGroupsImpl) { SecurityRuleGroupsImpl impl = (SecurityRuleGroupsImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.SecurityRuleGroups> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.SecurityRuleGroups>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
public static InstanceIdentifier<SecurityRuleGroups> securityGroupsIid(Uuid tenantId, Uuid securityGroupId) { return InstanceIdentifier.builder(TenantLogicalNetworks.class) .child(TenantLogicalNetwork.class, new TenantLogicalNetworkKey(tenantId)) .child(SecurityRuleGroupsContainer.class) .child(SecurityRuleGroups.class, new SecurityRuleGroupsKey(securityGroupId)) .build(); }