///GENMHASH:C48A746F5694508AB09E61AAF0F90782:5F8FA9E8CC1C70C9CDDD00BC8211E388 public EventHubNamespaceImpl WithSku(EventHubNamespaceSkuType namespaceSku) { Sku newSkuInner = new Sku { Name = namespaceSku.Name(), Tier = namespaceSku.Tier(), Capacity = null }; Sku currentSkuInner = this.Inner.Sku; bool isDifferent = currentSkuInner == null || !currentSkuInner.Name.Equals(newSkuInner.Name); if (isDifferent) { this.Inner.Sku = newSkuInner; if (newSkuInner.Name.Equals(SkuName.Standard)) { newSkuInner.Capacity = 1; } } return(this); }
///GENMHASH:C48A746F5694508AB09E61AAF0F90782:5F8FA9E8CC1C70C9CDDD00BC8211E388 public EventHubNamespaceImpl WithSku(EventHubNamespaceSkuType namespaceSku) { Sku newSkuInner = new Sku { Name = namespaceSku.Name().ToString(), Tier = namespaceSku.Tier().ToString(), Capacity = null }; Sku currentSkuInner = this.Inner.Sku; bool isDifferent = currentSkuInner == null || !currentSkuInner.Name.Equals(newSkuInner.Name, StringComparison.OrdinalIgnoreCase); if (isDifferent) { this.Inner.Sku = newSkuInner; if (newSkuInner.Name.Equals(SkuName.Standard.ToString(), StringComparison.OrdinalIgnoreCase)) { newSkuInner.Capacity = 1; } } return(this); }
///GENMHASH:86E56D83C59D665A2120AFEA8D89804D:FF17376D1DC52D341D64F2CDC53088D2 public override bool Equals(object obj) { string value = ToString(); EventHubNamespaceSkuType rhs = (EventHubNamespaceSkuType)obj; if (!(obj is EventHubNamespaceSkuType)) { return(false); } else if (ReferenceEquals(obj, this)) { return(true); } else if (value == null) { return(rhs.ToString() == null); } else { return(value.Equals(rhs.ToString(), StringComparison.OrdinalIgnoreCase)); } }
/// <summary> /// Specifies the namespace sku. /// </summary> /// <param name="namespaceSku">The sku.</param> /// <return>Next stage of the event hub namespace definition.</return> EventHubNamespace.Definition.IWithCreate EventHubNamespace.Definition.IWithSku.WithSku(EventHubNamespaceSkuType namespaceSku) { return(this.WithSku(namespaceSku) as EventHubNamespace.Definition.IWithCreate); }
/// <summary> /// Specifies the namespace sku. /// </summary> /// <param name="namespaceSku">The sku.</param> /// <return>Next stage of the event hub namespace update.</return> EventHubNamespace.Update.IUpdate EventHubNamespace.Update.IWithSku.WithSku(EventHubNamespaceSkuType namespaceSku) { return(this.WithSku(namespaceSku) as EventHubNamespace.Update.IUpdate); }